Cancel Create editor in preCreate event
Cancel Create editor in preCreate event

Hi
I have this code adn wish to cancel a create if isOk == false. How is this achieved? Thanks
editor4.on( 'preCreate', function ( e, node, data, items, type ) { //*HERE*
dataTable.row( function () {
var isOk = ManageUserRepVal(data);
if (isOk == false) return false;
} );
} );
This discussion has been closed.
Answers
Hi @dynasoft ,
preCreate
isn't cancellable. Depending on whether you want to stop the form being displayed, or the data being submitted, use eitherpreOpen
orpreSubmit
respectively.Cheers,
Colin
Many thanks Colin. That worked.