Lazy loading is useful when you are dealing with large hierarchical data sources
and would like to avoid the delays involved in loading the entire data set at once.
The TreeView control makes lazy-loading super easy.
Only set the second parameter lazyLoadActionUrl and provide a url to obtain the lazy nodes data.
If the child node has children, you can set an empty array to the field which name is what the
ChildItemsPath property stands for.
Otherwise, let it to be null.
when the user expands the node. This function takes two parameters: the parent node
and a callback function to be invoked when the data becomes available.
The tree in example below starts with three lazy-loaded nodes.
When you expand them, the OnClientLazyLoadFunction is invoked. The function
uses a setTimeout to simulate an http delay and returns data for three child nodes,
one of which is also a lazy-loaded node.
The example also uses some CSS to animate the node icons while they are being