Categories | Question details Back To List | ||
Node Order Hi! I need to alter order of my nodes in a tree (via Javascript), but only nodes at the same level, so i can move nodes changing order but never parent. How can i do this? Regards, Answer posted by Support on Apr 04, 2008 01:54 You can set "onDrag" event handler. "onDrag" event occurs in case of moving nodes manually (drag-n-drop) or by the script (moveItem method). If the function returns false, the moving will be denied. For example: tree.setDragBehavior(sibling); tree.attachEvent("onDrag",function(id,targe_id){ if(tree.getParentId(id)==tree.getParentId(target_id)) return true else return false }) |