Check documentation for the latest version of dhtmlxSuite onBeforeDrag DHTMLX Docs


fires when a user clicks on an item, but before the dragging is started

boolean onBeforeDrag(string|number id,number index);
idstring|numbercell id
indexnumbercurrent cell index (starting from 0)
boolean"return true" - allows cell to be dragged, "return false" - otherwise


var myAcc = new dhtmlXAccordion(...);
myAcc.attachEvent("onBeforeDrag", function(id, index){
    // your code here
    return true; // allow dragging

Related samples

Change log

added in 4.2

Back to top