When an error occurs when adding for some reason ,the record remain in the grid,
It should not be appearing in the grid,
When I refresh the page, it is deleted.
It is assumed that when an error occurs when adding or edting the row. is not drawn record in grid, How can I avoid that
CRUD operations are not built-in functionality - the code that add, delete or update record is at your premise and you are responsible when and how to reload the DataGrid depending on your case.