I know how to have an editable GridView along with a SqlDataSource in which each edit (update/insert/delete) is immediately persisted to the database (using the SqlDataSource's UpdateCommand, Insertcommand, etc).
What I need now is to have an editable GridView that maintains all edits in viewstate until the user presses a "Save" button elsewhere on the form.
In other words:
- On first load, populate the GridView from DB data
- User makes various edits to the data, which are not persisted to the DB yet, but which survive through any number of postbacks.
- User presses Save, and all the changes are persisted to the DB
I assume I'll need to write custom code to persist the data in step 3, but is there a straightforward, out-of-the-box approach to step 2?