We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridGroupingControl - saving the expanded rows

Hello,

I have a grid with one parent and one child table. What I want to do is this:

1) Expand a few parent rows to display their child rows

2) Refresh all of the data (which repopulates the grid and collapses all of the parent rows)

3) Automatically re-expand the parent rows that were already expanded in step #1 to display thier child rows again.


Any help is appreciated - I thought this issue may exist in another thread, but I could not find it. Thanks for your time!

2 Replies

RA Rajagopal Syncfusion Team June 7, 2007 08:44 PM UTC

Hi Dave,

You can loop through the records in the parent and save thier expanded and collapsed state in a hashtable with its record index as the key. Then at a later point when you refresh the data, restore the expanded and collapsed states of the parent records. Please refer the attached sample that will help you in doing this.

Here is a sample
http://websamples.syncfusion.com/samples/Grid.Windows/F62056/main.htm

Regards,
Rajagopal


DB Dave Busch June 9, 2007 02:35 PM UTC

Works great - thank you so much!

>Hello,

I have a grid with one parent and one child table. What I want to do is this:

1) Expand a few parent rows to display their child rows

2) Refresh all of the data (which repopulates the grid and collapses all of the parent rows)

3) Automatically re-expand the parent rows that were already expanded in step #1 to display thier child rows again.


Any help is appreciated - I thought this issue may exist in another thread, but I could not find it. Thanks for your time!

Loader.
Live Chat Icon For mobile
Up arrow icon