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

Calling ExpandAllHierarchyItems Doesn't Expand All Child Tables

7 Answers 156 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 31 Dec 2009, 12:18 AM
Hello,

  I think I may have ran into a bug - I have a GridView with 1 parent table, a child table from the parent table, and a child table of the child table.  This displays fine on the grid, and then I call the ExpandAllHierarchyItems method on the grid.  For some reason, it's only expanding the parent level table, and the items in the child table aren't being expanded. 

  Is this a bug, and if so, does anyone know any work arounds?

Thanks.

7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 05 Jan 2010, 07:53 AM
Hello Ryan,

Generally this method will expand only items for single level and to know more how to expand recursively the entire hierarchy I've attached small demo application. Please be careful with this since can cause serious performance problems!

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ryan
Top achievements
Rank 1
answered on 05 Jan 2010, 01:08 PM
Thanks, yeah that works, but it is a huge performance hit - on a grid with about 100 rows it takes about 10 seconds to load.  Is there any other easier / faster way to do this?

Thanks.
0
Accepted
Vlad
Telerik team
answered on 05 Jan 2010, 01:57 PM
Hello Ryan,

Since you want to expand all hierarchy levels actually you will force the grid to bind all hierarchy data which will cause these performance problems.

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ryan
Top achievements
Rank 1
answered on 05 Jan 2010, 03:13 PM
Thanks Vlad - this is a pretty big limitation to be honest - the grid should be able to expand all items in it fairly easily.

Thank you.
0
Rohit
Top achievements
Rank 1
answered on 24 Nov 2010, 07:38 AM
Is it fixed in latest release?
0
Peter
Top achievements
Rank 1
answered on 30 Nov 2011, 03:02 AM
10 seconds for 100 rows is beyond HORRIBLE..  Seriously..  Don't blame data binding for that, We bind 1000 rows in 1 second no problem.. But when doing ExpandAllHierarchyItems, everything goes to hell.

I think there's some serious mismanagement of what's visible going on..

I just ran a test..  11 rows, with one expanded to have 2 children.  Called CollapseAllHierarchyItems, which returned nearly immediately (0.034 seconds)  followed by RowLoaded events (and the corresponding cell value updates) for the 11 Rows (all still visible, nothing changed), a RowIsExpanding event for the row that collapsed, and a RowIsExpanded event for the same row.  

Can someone explain that waste?
0
Venkatesh
Top achievements
Rank 1
answered on 04 Mar 2014, 02:24 PM
Do not load your data every time you click on expand all.For performance point Load all the data from database and store somewhere in the list, and use this data in expand or collapse all.i follow the same thing and its working fine.
Tags
GridView
Asked by
Ryan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Ryan
Top achievements
Rank 1
Rohit
Top achievements
Rank 1
Peter
Top achievements
Rank 1
Venkatesh
Top achievements
Rank 1
Share this question
or