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

More on Persisting Groups Expanded States on Rebind

1 Answer 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
neebs
Top achievements
Rank 2
neebs asked on 25 Jan 2010, 05:05 AM
I am using the example here:


to preserve the expanded states of groups across postbacks. I am finding a situation where it is failing and I'm not sure why. For example, if I populate the grid, and expand a group, then refresh the page, the groups are expanded as expected. See Image 1. But, I have the grid set for AllowRowSelect in the ClientSettings of the grid. If I display the grid, expand a group and select a row, the row highlights as expected and the group stays expanded. If I then cause a refresh by clicking on a button on the page that rebinds the grid, the grid is expanded, and the group stays expanded. So far so good. But, after that, if I select a row, the grid group collapses, with the indicator left in the expanded state. See image 2. Even if the SelectedIndexChanged method is not set, the expanded state of the grid reverts to all groups collapsed, but the expanded buttons showing they're expanded.

1 Answer, 1 is accepted

Sort by
0
neebs
Top achievements
Rank 2
answered on 25 Jan 2010, 08:28 PM
Please ignore this posting, I found the problem. I was calling the code that expands/collapses groups in two places. Although the results were not what I would have expected, removing the redundant code fixed the problem.
Steve
Tags
Grid
Asked by
neebs
Top achievements
Rank 2
Answers by
neebs
Top achievements
Rank 2
Share this question
or