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

Populating client tree

1 Answer 46 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Contra
Top achievements
Rank 1
Contra asked on 06 Jul 2010, 12:08 PM
Hi

What is the best way of populating a tree on the client side?

Our current method is now getting all the nodes from the webservice, then iterate through all the nodes adding them one by one.
With alot of nodes with alot of children, this is not a very optimized solution I would think.

Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 12 Jul 2010, 08:27 AM
Hi Contra,

For now adding nodes to a RadTreeNodeCollection on the client side is only one-at-the-time style. For the Q3 2010 major release of RadControls for ASP.NET AJAX, we are planning to add "addRange" method in the client object of the collection.

Probably for now, the optimal solution is to add the nodes server-side if they are bigger than a certain amount.
Actually if you put the TreeView in a AjaxPanel, than it will be even better, because:
1. The nodes will be added faster on the server (RadTreeNodeCollection has AddRange method on the server);
2. Only the TreeView will postback (not the entire page).

Hope this is helpful for you!


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Contra
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or