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

Sorting on nested grid is collapsing the child nodes

2 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thangalskhmi
Top achievements
Rank 1
Thangalskhmi asked on 03 May 2012, 07:26 AM
Hi,

I have multi-level nested grid view and all the nested grids are expanded by default.
When i sort the first level items, all the child/nested levels are collapsed.
Is there any way to retain the expanded mode for all the child levels after sorting?

Thanks

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 03 May 2012, 07:46 AM
Hello Thangalskhmi,

That would be the expected behavior since the collection is reset on sorting. What you can try is to save in a particular property of your business object - MyCustomIsExpandedProperty for example and save the information whether the corresponding item is saved or not. Thus, after sorting, you can update the expanded state of the rows based on this property.  

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Thangalskhmi
Top achievements
Rank 1
answered on 04 May 2012, 01:47 PM
Thanks for the information Maya. I will try to use the custom property as you suggested.
Tags
GridView
Asked by
Thangalskhmi
Top achievements
Rank 1
Answers by
Maya
Telerik team
Thangalskhmi
Top achievements
Rank 1
Share this question
or