Hello,
I tried to manually remove a row from grid, something like:
grid.dataSource.remove(dataItem);
grid.dataSource.sync();
grid.dataSource.read()
If the removal is successful, everything seems ok.
If server side error occurs (throw exception, which could be caught in client error event), the grid looks OK after read(), but when I try to delete the row again, same custom error will be triggered twice, and more if click delete button more times.
I guess the custom errors or destroyed rows are accumulated. I have to reload the page to clear the errors.
What I want to achieve is:
1) When click a custom Delete button, delete current selected row
2) If deleting is successful, hide the row (or refresh the grid)
3) If deleting is not successful, show error and restore the row (or refresh the grid)
Please help to advice how to refresh the grid and clear destroyed rows/custom errors completed after server side removal error?
Thanks
Wicky
I tried to manually remove a row from grid, something like:
grid.dataSource.remove(dataItem);
grid.dataSource.sync();
grid.dataSource.read()
If the removal is successful, everything seems ok.
If server side error occurs (throw exception, which could be caught in client error event), the grid looks OK after read(), but when I try to delete the row again, same custom error will be triggered twice, and more if click delete button more times.
I guess the custom errors or destroyed rows are accumulated. I have to reload the page to clear the errors.
What I want to achieve is:
1) When click a custom Delete button, delete current selected row
2) If deleting is successful, hide the row (or refresh the grid)
3) If deleting is not successful, show error and restore the row (or refresh the grid)
Please help to advice how to refresh the grid and clear destroyed rows/custom errors completed after server side removal error?
Thanks
Wicky