Flexgrid grouping header name with 2 column names

Posted by: theruler0000 on 4 January 2021, 10:43 pm EST

    • Post Options:
    • Link

    Posted 4 January 2021, 10:43 pm EST

    Hi team,

    For years we are using this awesome product and we are glad to have you. Getting to the requirement, I have a Json which looks similar to the below json.

    [

    {

    “TemplateName”: “01a- Style Information”,

    “TabName”: “Summary”,

    “BlockName”: “SUG_Designer”,

    “BlockId”: 3028,

    “DeletedItemsIds”: null

    },

    {

    “TemplateName”: “01a- Style Information”,

    “TabName”: “Summary”,

    “BlockName”: “SUG_Designer”,

    “BlockId”: 3028,

    “DeletedItemsIds”: null

    },

    {

    “TemplateName”: “01a- Style Information”,

    “TabName”: “Summary”,

    “BlockName”: “SUG_Tech Designer”,

    “BlockId”: 3029,

    “DeletedItemsIds”: null

    },

    {

    “TemplateName”: “01a- Style Information”,

    “TabName”: “Summary”,

    “BlockName”: “SUG_Tech Designer”,

    “BlockId”: 3029,

    “DeletedItemsIds”: null

    },

    {

    “TemplateName”: “01a- Style Information”,

    “TabName”: “Summary”,

    “BlockName”: “SUG_Sourcing”,

    “BlockId”: 3030,

    “DeletedItemsIds”: null

    },

    {

    “TemplateName”: “01a- Style Information”,

    “TabName”: “Summary”,

    “BlockName”: “SUG_Sourcing”,

    “BlockId”: 3030,

    “DeletedItemsIds”: null

    }

    ]


    I am grouping the grid using groupDescriptions property with “BlockName” to group them. My requirement is that i want to place the BlockId beside “BlockName” in group header but grouping should be done on BlockName basis.

    Please help me with this.

  • Posted 5 January 2021, 4:03 am EST

    Hi Ananth,

    Thank you for the feedback. We really appreciate it and we are glad to have you too :slight_smile:

    Regarding your requirements, while creating an object of PropertyGroupDescription, you can provide a function to the converter parameter of its constructor which will return the block id with block name and push this object to the groupDescriptions array.

    Please refer to the sample link below for reference:

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

    Regards,

    Ashwin

  • Posted 5 January 2021, 4:41 am EST

    Thanks a ton Ashwin. I love the way you implemented. Working fine as expected. Thank you once again.

Need extra support?

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

Learn More

Forum Channels