Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Group on list grid field when some values are empty

    Hi,
    Im trying to group list grid field but records are not grouped when some values are empty. Is there a way to pull all empty values in a separate group while maintaining groups for other valid values. For eg., if values are 'A', '', 'B', '', 'B', 'A' then I want three groups: one group with all values 'A', another with all values 'B' and last group with all values ''.
    I have implemented getGroupValue in my field like so:
    Code:
    getGroupValue : function(value, record, field, fieldName, grid) {
        if(!value) {
            return 'empty value';
        }
        return value;
    }
    But getGroupValue doesnt get called at all and records dont get grouped.

    Thanks.
    Last edited by sjoshid; 4th Jun 2019, 11:53.

  • #2
    Hi sjoshid,

    this is working like you do in this sample.

    Best regards
    Blama

    Comment


    • #3
      Hi Blama
      The issue was the number of records I was fetching. I had to change `groupByMaxRecords` to a higher number than default and then it started working.
      Thank you.

      Comment

      Working...
      X