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

Retain expanded hierarchy state after parent column filter

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James Harkins
Top achievements
Rank 1
James Harkins asked on 17 Aug 2010, 10:41 PM
I have read and implemented the information from this post: Retain expanded/selected state in hierarchy on rebind, and it works well as long as I do not use column filtering.  When I filter the parent grid columns, the incorrect data items are expanded.  The index is the same, but the in data in the row is different and the child of that row should no longer be expanded.

From what I can tell, the recommended method of retaining the expanded state is based off of storing DataSetIndex of the row in a hash table.  When you filter a parent column, the original parent row can change to a different index in the grid or even disappear.  I would like to know the recommended practice for this scenario.  Should I simply closed all expanded child grids or could I possibly use something other than an index (such as a primary key of the data row) to identify  which rows should be expanded?

If I should simply kill all the child grids, what is the best way to do this? 

Thanks,
Jim

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 20 Aug 2010, 01:57 PM
Hello James,

To implement the desired functionality, I suggest that you use the approach from the Retain expanded/selected state in hierarchy on rebind code library and store the data key values of the expanded items instead of their item indexes.

I hope this helps.

Sincerely yours,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
James Harkins
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or