I acutally meant that I wanted to do this in de dropnode handler
function ftvMenu_OnDrop(targetnode, event)
The user drops a node on some other node. The droped node should then be inserted UNDER the node it was dropped in (not IN, not as a child)
Like this:
Node1
--child1
--child2 --< release child5 here
--child3
--child4
result:
Node1
--child1
--child2
--child5
--child3
--child4
So, the way i vision it, in ftvMenu_OnDrop eventhandler, I replace the targetnode for targetnode.parent, and set the index to the index+1 of the original target. Like this
function ftvMenu_OnDrop(targetnode, event)
{
var index=parent.index;
targetnode=targetnode.parent;
flytreeview_dragObject.index=index;
}
and this should be implemented at 1600 hours this day (it is now 13:44) ))
edit:
I tried this:
var i=target.i;
var parentnode=target.getParent();
parentnode.insertNode(flytreeview_dragObject.value, i+1);
but keep getting an exception: \"invalid acces to function to be used with node without owner treeview\"