Hello, I’m having troubles trying to order a subitems nodes.
I found out how order them when I expand the node, but when I add a new node I can’t figure out how.
The code goes like this
tree.refreshItem(nodeId);
tree.sortTree(nodeId);
The problem is that the first method start running, and goes to the second, so the second finishes and the first one isn’t finished yet. So, when the node expands again, after refreshing, the subitems aren’t ordered.
Is there a way to make sure the sortTree method will run after the refreshItem is finished?
Thanks!!