DHTMLX Docs & Samples Explorer

onBeforeAdd

Occurs before item adding is initiated.

data.attachEvent("onBeforeAdd", function (obj, index){
     //any custom logic here
     return true;
});

Parameters:

  • the object which will be added
  • the index which an item will be added at, optional

Description:

Event is blockable, if false value is returned by a custom method, the default reaction will be blocked.