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

[Solved] Load on demand from client side without calling expand()

2 Answers 84 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Wendelstam
Top achievements
Rank 1
Wendelstam asked on 07 Mar 2013, 10:35 AM
I have a TreeView that loads child nodes through a webservice call when I expand by clicking or by calling .expand() on the node object in javascript.
I need to load (atleast sometimes) large number of child nodes and I would like to be able to quickly server the UI a list of parent nodes that are then by filled with childnodes through the webservice from JS on the client side.

So for example in the $.ready() event start loading childnodes for my tree without expanding them.

The reason is that i have a filter box that searches the treeview structure and therefore I need all the nodes but I dont want to take the performance hit at the first rendering.

Is it possible to call a method like (psuedo) .load_from_webservice() on the Node client objects?

2 Answers, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 11 Mar 2013, 12:07 PM
Hi Jonah,

This scenario is achievable, but it requires some custom javascript code. I've attached a small sample page demonstrating how this could be done. 
 

All the best,
Bozhidar
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
Wendelstam
Top achievements
Rank 1
answered on 11 Mar 2013, 05:35 PM
Thanks, it works great!
Tags
TreeView
Asked by
Wendelstam
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Wendelstam
Top achievements
Rank 1
Share this question
or