Check documentation for the latest version 6.0 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){ ... };

Parameters

idstring|numberthe item's id
pIdstring|numberthe parent's id
indexnumberthe new item's index

Returns

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