Check documentation for the latest version of dhtmlxSuite onBeforeAdd DHTMLX Docs


fires before item adding is initiated

boolean onBeforeAdd(object obj, [index index] );
objobjectan object which will be added
indexindexindex, at which item will be added, optional
booleantrue - to trigger the default action, false - to block it


myDataView.attachEvent("onBeforeAdd", function (obj, index){
    // your code here
    return true;


the event is blockable, if the false value is returned from the custom method, the default reaction will be blocked

Back to top