Let’s assume that ( the first time page is created ) I manually bind GridView to some data source. Is there’s a way to configure GridView to delete a row ( by pressing row’s delete button) without handling any of the delete events ( in other words, we wouldn’t try to delete a row in data source and then rebind GridView to it)? Instead, GridView would simply remove that row from its ViewState and then display all rows minus the deleted one
So then how would you end up remembering this and deleting it in the db? Why not do what may be simplier is to have a bit field in your table called Deleted. That way when someone deletes something accidentally it is still there.
Your record set would make use of a WHERE clause to filter Deleted=False
Instead of binding the GridView to your data source, bind it to a collection built from your data source. You can then add to, delete from and modify the collection as much as you want, without ever affecting the underlying database table.