DHTMLX Docs & Samples Explorer

onDrag Event

This event calls user-defined handlers (if there are any) and passes the following parameters:

  • sId - id of the source item;
  • tId - id of the target item;
  • id - if the node is dropped as a sibling, id of the item before which the source node will be inserted;
  • sObject - source tree object;
  • tObject - target tree object.
          tree.attachEvent("onDrag", function(sId,tId,id,sObject,tObject){});
 

This event returns:

true - confirms drag-and-drop start;
false - denies drag-and-drop.