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

Retaining the expansion in RadGridView

1 Answer 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Prakash
Top achievements
Rank 1
Prakash asked on 14 Feb 2012, 08:37 AM
Hi Team,

I'm in need of a small issues, and issue is retaining the expanded row in RadGridView with RadTreeListView.

I've a RadGridView inside that I've placed a radtreelistview. so it will show three level hierarchy. 
Each grid row contains radtreelistview and selecting a grid row shows radtreelistview for that particular row with all child row in collapsed state. on selecting row from radtreelistview, shows it's child row. 

Now, I've a refresh button to refresh the data whenever required. so, when user refresh the data I need to retain the expanded rows as it was before refreshing. What way I can achieve this. 

Right now, I'm iterating all rows in the grid and selecting the rows which are expanded and storing it in a list. once data loaded after refresh, I'm iterating the rows in the list and rows in the grid and expanding the matched rows. but I want to know is this the right way to do since if it going to have 1000 rows or more than that means iterating will be performance issue. Please provide an idea on this case.

One more thing, I want to know how to get the expanded rows from RadTreeListView which inside the grid view row and how to set the expansion back  to RadTreeListView.

Thanks,
Prakash.

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 17 Feb 2012, 08:29 AM
Hi Prakash, 

You can use Expanded changed event (or RowDetailsVisibilityChanged event) in order to store the information about expanded state for a particular item and then RowLoaded event to expand row for this data item. You can use the same approach for RadTreeListView too.

All the best,
Nedyalko Nikolov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Prakash
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or