Hi,
I am using iggrid in my Angular 2 project,there is something wrong i have written in iggridupdatingrowdeleting
we are using webapi as our backend, the problem i am facing is row get deleted before i have receive error notification from Webapi,in this case record exists in DB but not in Grid , but once i refresh grid record get back again.
even i have written return false in my catch section but still row get deleted. (autoCommit: true in my grid)
following is the code:
Hello Yogesh,
You're making and async call to the server in 'iggridupdatingrowdeleting' event, so what you see is expected (the row gets immediately deleted in the grid). Unless you return false in the event handler itself the deleting of the row won't be cancelled.
Your options are:
1. In the error handler of the "delete" request you can use the igGrid.rollback API to undo deleted row.
2. Cancel 'iggridupdatingrowdeleting' event and in the success handler of the "delete" request call the igGridUpdating.deleteRow API to manually delete the row once you're sure it's deleted on the server.
Best regards,Martin PavlovInfragistics, Inc.
Hi Martin,
Thanks for Reply
I have tried Option 1, but there is not luck. please check my below code .
also attach Screenshot
Can you please share sample for option 2
Thanks,
Yogesh