RadTreeList AllowLoadOnDemand Manual Expand

5 posts, 0 answers
  1. Patrick
    Patrick avatar
    15 posts
    Member since:
    Jun 2010

    Posted 08 Aug 2012 Link to this post

    I'm using a RadTreeList which has AllowLoadOnDemand set to true.  Everything works as expected.  On top of this functionality, we would like the ability to programmatically expand certain items in the RadTreeList depending on the situation.  For example, a user would come into the screen, start expanding nodes, and then save the state of the expansion.  Currently, I am able to retrieve the ID's for the items expanded and store them appropriately, but cannot figure out how to force that specific expansion back to the RadTreeList when the user returns.  It seems that the RadTreeList always starts with only top items and I am unable to programmatically expand to the corresponding ID's since they do not exist yet within the RadTreeList until the user manually expands (calling OnChildItemsDataBind) again to the same state.

    Example:
    User comes to the screen, alters RadTreeList to expand only certain nodes.  User clicks save (I capture the IDs of the items expanded and store in the db),  Later, user returns to the screen (I retrieve previously expanded nodes) and user expects to see the same expansion when save was clicked. 

    Thanks!
  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 13 Aug 2012 Link to this post

    Hi Patrick,

    You can find an explanation and a sample project with one possible approach of achieving your goal in this forum post:
    http://www.telerik.com/community/forums/aspnet-ajax/treelist/expand-a-branch-to-one-particular-node.aspx#1833417

    Greetings,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Patrick
    Patrick avatar
    15 posts
    Member since:
    Jun 2010

    Posted 13 Aug 2012 Link to this post

    Thanks for your response but this solution does not seem to work when AllowLoadOnDemand="true" for a RadTreeList
  5. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 16 Aug 2012 Link to this post

    Hello Patrick,

    Indeed I missed the part about you using load on demand when I suggested this approach. To be able to expand all items in a load on demand scenario, check this forum post:
    http://www.telerik.com/community/forums/aspnet-ajax/treelist/issue-with-expand-to-level.aspx#2121953

    Kind regards,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Patrick
    Patrick avatar
    15 posts
    Member since:
    Jun 2010

    Posted 16 Aug 2012 Link to this post

    Thanks!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017