Flexgrid how to sort after groupby?

Posted by: jacobturley on 4 January 2018, 6:39 pm EST

    • Post Options:
    • Link

    Posted 4 January 2018, 6:39 pm EST

    Hey all! I was following the example listed here: https://www.grapecity.com/en/blogs/creating-outlines-and-trees-with-the-c1flexgrid-control

    And I got the Nodes and Tree working just fine.

    However, it is not very clear how to handle sorting after the grouping is applied. I tried to find the analyze example but couldn’t find it. We are already handling all sorting programatically, so any direction on how to sort and keep the grouping in place would be great, thanks!

  • Posted 5 January 2018, 12:42 am EST

    Hi!

    To achieve the desired behaviour, please use AfterSort event in which you can apply grouping once the data is sorted. I am attaching a sample application for your reference.

    Prj_SortAfterGrouping.zip

    Best,

    Meenakshi

  • Posted 5 January 2018, 1:57 pm EST

    Sweet that helped a lot! Thank you! One last question(hopefully)!

    How do I essentially “clear” a groupby? I do grid.tree.clear, but that doesn’t delete the node rows, and I’m not seeing a way to actually delete a node row… I can set it to be invisible, but if they are able to dynamically group and ungroup, I would have a lot of node rows taking up space…

  • Posted 5 January 2018, 2:02 pm EST

    Found it!

    c1FlexGrid1.RemoveItem(index);

Need extra support?

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

Learn More

Forum Channels