Check documentation for the latest version of dhtmlxSuite onBeforeDrop DHTMLX Docs

onBeforeDrop

fires before an item is dragged to another target and the mouse button is released, cancelable

boolean onBeforeDrop(string|number id,string|number pId,number index);
idstring|numberthe item's id
pIdstring|numberthe parent's id
indexnumberthe new item's index
booleantrue to allow operation

Example

myTreeView.attachEvent("onBeforeDrop", function(id, pId, index){
    // your code here
    return true;
});

Details

the event is blockable: return false to block the item's dropping

Back to top