PDA

View Full Version : Tree Drag Drop Position



agdjrex
27 Sep 2007, 1:55 AM
When dragging a new node and dropping onto a tree control how can I determine the numeric position of the dropped node if it's a child of the root node?

Thanks in advance.

evant
27 Sep 2007, 3:48 AM
Something like this:



myTree.on('nodedrop', function(dropEvent)
{
var idx = myTree.getRootNode().indexOf(dropEvent.dropNode);
}
);


This will find the index of the dropped node.

agdjrex
27 Sep 2007, 4:03 AM
Thanks very much for the response. I'll look into that.

Andy