Reload children of a "loaded" node in dynamic loading


Please consider the following scenario: Our back end processes might change children of many nodes at one shot. We want to update all changed nodes that are currently “open”, and mark those that are currently “closed”. Only when user clicks on one of those “closed” nodes, tree loads updated children from server side.

We’re using dynamic loading. I’m wondering what would the most efficient way to implement this.

Thank you!


if you are using PRO edition, you can easily save and restore open states. And in this case you could use something like this:

tree.saveOpenStates(); tree.refreshItem(0); // refreshes the whole tree var h = tree.attachEvent("onXLE",function(){ tree.loadOpenStates(); // opening items after refresh tree.detachEvent(h); });