Filter/Grouppanel Undefined, blank and null value

Posted by: ricardo.valim on 16 April 2020, 11:14 am EST

  • Posted 16 April 2020, 11:14 am EST

    Hello guys!

    Most of the times, when sorting, filtering and grouping, Wijmo’s Grid differ undefined, blank and null values, correct thinking as a programmer, but as a end user, for a string field all of them have the same value, at least visually.

    During sorting it was solved using sortComparer, but I could not find similar methods for Filtering and Grouping(GroupPanel[/https://www.grapecity.com/wijmo/demos/Grid/Grouping/GroupPanel/purejs]).

    Is there somemethod where I cand treat undefined as blank or “” for example?

    Tks!

  • Posted 17 April 2020, 1:27 am EST

    Hi Ricardo,

    In the case of filtering, the blank, null and undefined values were not shown as different values, In the value filtering, all these values are displayed as ‘(nothing)’ and in condition filter, they were depicted as empty values.

    The issue was in sorting and grouping only. You already have a solution for sorting, but I would suggest you use sortConverter property instead of the sortComparer.

    The sortCoverter, as the name suggest, converts a value to a different value while sorting. So, you can convert all the blanks, nulls and undefined to a null value.

    For GroupPanel, you can use the groupDescriptionCreator property. This is also similar to the sortConverter, but using this, you can create a single group with the blank, null and undefined values.

    Please refer to the sample link below for a demo:

    https://stackblitz.com/edit/js-afxebn

    Note that the groupDescriptionCreator property was added in 5.20201.663 version just for these types of scenario. So, you will need to update wijmo to this version if you have not already.

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels