Change tracking
Edit cells, add rows and delete selected rows. Changed rows and cells are marked, and the grid keeps the net changes (inserted / updated / deleted) in a hidden form input. Save submits the form to a fake server that answers with database ids, then the grid accepts the changes. Discard restores the original data.