When i use the grid inbuilt Add modal, the record shows added in grid ( if i refresh it goes away) even though it failed to Add to DB
How to avoid adding to the grid when my API call failed
I tried cancelling in args.cancel= true;
actionComplete(args) {
if ((args.requestType === 'beginEdit' || args.requestType === 'add')) {
const dialog = args.dialog;
// change the header of the dialog
dialog.header = 'New Link'; //'Edit User ' + args.rowData[FirstName]
}
if (args.requestType === 'save') {
args.cancel= true;
}
}