extjs - EXTSJS: treepanel move a branch programmatically -


I have a tree where the user can drag and drop branches, now all this works well and good , But I should be able to move a branch programmatically. I need to simulate a cut and paste (I have to use the button instead of the user Ctrl - X and V ) There is also an idea from where should I start?

OK, I got the solution and it really came true, very simple:

var child = tree.getSelectionModel (). GetSelectedNodes (); Var Parent = Tree .getNodeById ('ABC 123'); Parent.appendChild (child);

It will automatically remove the node from its original location and it will also move any child in the node.

Note that this will only work on one node moment (even if it is using the chosen nodes) and I will post something more important later.


Comments