RadTreeView for ASP.NET

Optimizing treeview performance Send comments on this topic.
See Also
TroubleShooting > Optimizing treeview performance

Glossary Item Box

Telerik RadTreeView does support a large number of nodes, however it can only show a limited number of nodes at a time on client side.

Imagine 10,000 lines of text and values (say, 100 bytes per line) - this alone makes 1MB HTML size, which actually makes showing 10,000 lines of text at the same time in a web-context virtually impossible. That's why large datagrids use paging for showing data.

Telerik RadTreeView nodes require even more HTML than that - plus the ViewState required for state management and the javascript make it virtually impossible to show more than, say, 1000 nodes at a time even if the treeview contains 10,000 nodes. After expanding each node, only the nodes that are visible are populated, hence making it possible to minimize the nodes shown on screen until the user navigates to the desired node. This works fine for the majority of tree structures when there are a lot of levels and a relatively small amount of nodes per level - but it will not work if you have, say, 2000 child nodes of a particular node. That is why Load On Demand is used.

Basically a tree with more than 200 nodes should not be displayed at once without Load On Demand. You can test this with any other treeview products - you will have results similar to ours.

Also, you can subscribe to the NodeCollpase event and clear the child nodes upon collapsing the TreeNodes. Thus, the "weight" of the page will be reduced when the TreeNodes are collapsed.

Also, we suggest that you use a very short ID for the treeview - all treenodes have IDs that are formed based on the treeview ID - and if it is too long, all IDs will be too long, hence the extra markup. You may try:


<rad:radtreeview ID="t" runat="server" ... >

See Also