RadControls for ASP .NET AJAX version |
2008.1.415 and later |
.NET version |
2.0 and later |
Visual Studio version |
2005 and later
|
Programming language |
C# |
Browser support |
all browsers supported by RadControls for ASP .NET AJAX
|
PROJECT DESCRIPTION
When there is a requirement to save the groups' expanded/collapsed state in RadGrid you can follow these steps:
- Create a hashtable to store each group's expanded state, store it in viewstate or in session
- Wire GroupsChanging, ItemCommand and DataBound events
- In GroupsChanging and ItemCommand event update the hashtable according to the action taken (expand, collapse, group, ungroup, sort a group)
- In DataBound event handler loop through the GridGroupHeaderItems and expand/collapse them according to the state stored in the hashtable.
You can find attached a sample project that implements the described functionality.