Massoud Mazar

Sharing The Knowledge

Showing animated icon while populating TreeView with PopulateOnDemand

TreeView server control in asp.net can use AJAX behind the scenes to populate child nodes when user clicks on the expand icon next to each node. If the loading process is fast, it works perfectly. But when child nodes are generated by a slow process (like a slow database query) then user experience is unacceptable. User would click on the expand and nothing would happen for a long time, leaving user wondering if the click really did anything.

In such scenarios, an animated icon that lets user know data is being loaded would help a lot. More...