Calling ExpandAllHierarchyItems Doesn't Expand All Child Tables

8 posts, 1 answers
  1. Ryan
    Ryan avatar
    8 posts
    Member since:
    Oct 2012

    Posted 30 Dec 2009 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 05 Jan 2010 Link to this post

    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.
  3. DevCraft banner
  4. Ryan
    Ryan avatar
    8 posts
    Member since:
    Oct 2012

    Posted 05 Jan 2010 Link to this post

    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.
  5. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 05 Jan 2010 Link to this post

    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.
  6. Ryan
    Ryan avatar
    8 posts
    Member since:
    Oct 2012

    Posted 05 Jan 2010 Link to this post

    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.
  7. Rohit
    Rohit avatar
    12 posts
    Member since:
    Feb 2009

    Posted 24 Nov 2010 Link to this post

    Is it fixed in latest release?
  8. Peter
    Peter avatar
    19 posts
    Member since:
    Sep 2011

    Posted 29 Nov 2011 Link to this post

    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?
  9. Venkatesh
    Venkatesh avatar
    4 posts
    Member since:
    Sep 2013

    Posted 04 Mar 2014 Link to this post

    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.
Back to Top
DevCraft banner