This is a migrated thread and some comments may be shown as answers.

[Solved] Group expand / collapse state

2 Answers 258 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 31 Jan 2008, 05:26 PM
In my grids, the expansion state of groups is not persisted across postbacks.  After the postback, all groups are either expanded or collapsed based on the GroupsDefaultExpanded property.

If all the groups are collapsed by default, for instance, and the user expands two of them, and then goes to do something like a sort, I would like to have those two groups expanded after the postback. 

I'm sure I can work this out myself by keeping track of each group and then handling them in ItemDataBound.  However, I wanted to make sure that I wasn't missing a setting somewhere that automatically does this. 

Also, if there is no setting, is this behavior intended or is it a bug?  If it is a bug, I may wait for the fix to come out rather than take the time to handle it myself (it seems similar to the issue where scroll position is not persisted which I think has been identified as a bug).

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 01 Feb 2008, 10:56 AM
Hi Mark,

I believe this is the expected behavior. When RadGrid is sorted it is databound, so the groups appear as specified in GroupsDefaultExpanded property. Indeed, a possible solution is to keep track of expanded/collapsed groups and expand/collapse them appropriately in ItemDataBound event handler.

Greetings,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark
Top achievements
Rank 1
answered on 01 Feb 2008, 01:45 PM
Thanks, Ves.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Ves
Telerik team
Mark
Top achievements
Rank 1
Share this question
or