Categories | Question details Back To List | ||
how to drag leaf level node while dragging parent node in a tree? Hi, I am using dhtmlxtree in my applicaion. I need to drag all the childrens only by dragging the parent node. How to do that? For example, I have a tree (-)2008 ------ january -- page1 -- page2 ----- february -- page3 ---- march -- page4 (-) 2009 ------ january -- page5 -- page6 ----- february -- page7 ---- march -- page8 Here i need to drag node 2008, but it should drag and drop the leaf childrens only. here page1, page2, page3, page4. Suppose if I drag the node january , then it should drag and drop page1,page2 only. how to do that? Acually i am getting all the leaf nodes using var totalIDs=holidaytree.getAllSubItems(idFrom).split(","); Please help me. thanks, Velmurugan. Answer posted by Alex (support) on Jul 28, 2009 03:56 Hello, you can try to use the following approach: tree.attachEvent("onDrag",function(sid,tid){ function addItems(sid,tid,sobj,tobj){ Answer posted by velmurugan on Jul 28, 2009 04:44 Gr8.... thanks alex. It is working fine. I have 1 more doublt. how do i know that from which tree i am dragging? any identification or relationship between tree and its node? Answer posted by Alex (support) on Jul 28, 2009 04:59 onDrag event handler gets more parameters: 1- source id; So, you can use 4th and 5th parameters to identify tree. |