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

RadTreeList AllowLoadOnDemand Manual Expand

4 Answers 124 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 08 Aug 2012, 10:55 PM
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!

4 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 13 Aug 2012, 10:50 AM
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.
0
Patrick
Top achievements
Rank 1
answered on 13 Aug 2012, 12:19 PM
Thanks for your response but this solution does not seem to work when AllowLoadOnDemand="true" for a RadTreeList
0
Tsvetina
Telerik team
answered on 16 Aug 2012, 08:38 AM
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.
0
Patrick
Top achievements
Rank 1
answered on 16 Aug 2012, 12:28 PM
Thanks!
Tags
TreeList
Asked by
Patrick
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or