C1FlexGrid Sort reset the Group and nodes

Posted by: jsomarriba on 24 September 2018, 10:24 am EST

    • Post Options:
    • Link

    Posted 24 September 2018, 10:24 am EST

    Hello,

    Hello,

    https://www.grapecity.com/en/blogs/creating-outlines-and-trees-with-the-c1flexgrid-control#helloi-downloaded-the-proj

    I downloaded the project and it is working properly in the last version of .net and visual studio.

    But when we select the option "Tree by Country " and next click over SalesPerson in order to sort the column, the grid is reset like the fist time and lost the tree.

    I need to know if this is limitation of the grid when it is grouped and a column is ordered. or if we have to do or add some additional code.

    Can you please help me?

    Thank you.

  • Posted 24 September 2018, 6:45 pm EST

    Hello,

    I am not GrapeCity, but I went through that tutorial recently. From what I remember, you’d have to redo the grouping after anything that updates the contents of the grid. I.e, after sort, you’d have to reapply the groups.

    However, if you’re able to upgrade to the latest release, they now have built in grouping which is much better than that version. The property on the grid is called GroupDescriptions, and it handles everything for you.

    For more info check this blog.

    https://www.grapecity.com/en/blogs/add-dynamic-grouping-to-winforms-data-grid

  • Posted 25 September 2018, 12:50 am EST

    Hi,

    Thanks for your answer bharatmann. You’re right. You would need to re-apply Grouping after making changes to the order of data in grid (when using manual grouping).

    You should use GroupDescriptions to apply grouping if you want the data to be sorted according to the grouping.

    You should also check the link given by bharatmann as it gives more details about how to use GroupDescriptions with sorting.

    Regards,

    Jitender

Need extra support?

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

Learn More

Forum Channels