fires before adding an item to the datastore

boolean onBeforeAdd(string|number id,object obj,number index);
idstring|numberthe ID of the newly added data item
objobjectdata for the new item
indexnumberthe index, at which the new item will be added
booleanfalse, if the operation needs to be cancelled


view.data.attachEvent("onBeforeAdd", function(id, obj, index){
    if (obj.text == "")
        return false;


Returning false from the event handler will block further processing, and the item will not be added.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript ui library and page of javascript kanban product.