Saveing of Expand/Collapse groups status

2 posts, 1 answers
  1. Grigory
    Grigory avatar
    11 posts
    Member since:
    Feb 2015

    Posted 19 Sep 2017 Link to this post


    I have a gridview control which items is automatically updated from time to time. A user has ability to group items in the grid (using standard drag and drop approach). However, after items updating groups collapse, even if they were expanded. If I set AutoExpandGroups = false, groups will be always expanded after update.

    I would like to save expand/collapse group status. Is it possible to implement?

    Thank you in advance

  2. Answer
    Stefan avatar
    877 posts

    Posted 22 Sep 2017 Link to this post

    Hello Grigory,

    You should be able to achieve your goal by hooking to the GroupRowIsExpandedChanging event of RadGridView. Through the event arguments you can access the Row.Group element and save its instances somewhere. Then, when the items are updated you can expand the saved group/groups through the ExpandGroup method of the control.

    In addition, you can take a look at the Grouping events topic for more information on this matter.

    Hopefully, this helps.

    Stefan X1
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top