Parameters:
view.attachEvent("onBeforeAdd", function (obj, index){ //any custom logic here return true; });
Event is blockable, if non-true value returned from custom method, default reaction will be blocked