DHTMLX Docs & Samples Explorer

onBeforeAdd

Event name is case insensitive.

This event calls user-defined handlers (if there are any) and passes the following parameters:

  • obj - data for a new item
  • index - an index, at which a new item will be added
chart.attachEvent("onBeforeAdd", function (obj, index){
//any custom logic here
});

Event can be blocked, returning false will prevent normal reaction of component.