DHTMLX Docs & Samples Explorer

onBeforeAdd

Occurs before item adding is initiated.

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

Parameters:

  • id - the item id
  • obj - the item object
  • pos - (optional) the index of the position that the item will be added at (zero-based numbering)

Description:

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