Tree Control - Paged/On Demand population
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi Can anyone offer any advice on how to achieve on demand/paged population on tree controls for performance. How is this usually done in .NET? Thanks in advance...
You add a "dummy" child node for every node whose real children have yet to be loaded. When a node is expanded you check if it has a dummy node, and if it does, remove the dummy node and add the real child nodes. The dummy node might have Text of "*" or some value which is meaningless in the context of your application. The "advanced demo" in the sample app for my TreeViewWalker article uses load-on-demand: http://www.codeproject.com/cs/miscctrl/TreeViewWalker.asp[^] Josh