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

GridGroupingControl saving Collapsed or expanded position of rows

I have rows and subrows displayed in a grid, using GridGroupingControl.
I want to collapse some of the expanded rows. So presently i have some expanded and some collapsed rows. Now after closing this application, if i am running this application once again, is this possible to open grid in the same state, i closed my application previously i.e. some rows expanded and some rows collapsed

Please reply me soon

3 Replies

RC Rajadurai C Syncfusion Team June 20, 2009 09:12 AM UTC

Hi Vihang,

Thanks for your interest in Syncfusion Products.

There is no direct support for saving the expand/collapse information of the grid. This has to be done manually. You can iterate through all the DisplayElements collection and save necessary details of the record which has been expanded or the group which has been expanded and save the information in a text file or xml file. Then this information can be used to re-implement the grid with the settings.

In the sample provided, a string "f" is used to store the expanded state and retrieved it even when the records are collapsed. You can use same type of method to store Groups being expanded and replay it. To observe the behavior in sample, expand some records and click "Save" button. Then collapse the records back to normal and click the "Expand" button.
http://files.syncfusion.com/support/samples/Grid.Windows/7.2.0.20/F82658.zip

Regards,
Rajadurai


VM Vihang Mankad June 23, 2009 06:29 AM UTC

Thanks for your reply,
My application is very big, and this is one of the small module. Number of users uses this application. For each user using the application, it is not possible to save collapsed and expanded state by storing their values in xml file.
Is there any other solution possible.
Thanks in advance.


RC Rajadurai C Syncfusion Team September 7, 2009 12:35 PM UTC

Hi Vihang,

I apologize for the long delay in getting back to you.

To save/restore expanded/collapsed state in grid, using xml serialization/deserialization technique is the best and only way to achieve.

Please let me know if you have any further concerns.

Regards,
Rajadurai

Loader.
Live Chat Icon For mobile
Up arrow icon