I started a new project, put a grid on a page and bound an adapter to it. I then put a RowEditTemplate and attached it to the grid. When I run the app, everything does what it should except when I hit the OK button, it doesn't push the changes back to the DB.
Here's the code generated for the click event.
{ // This code was automatically generated by the RowEditTemplate Wizard // // Close the template and save any pending changes. this.editInvoiceHours.Close(true); }
I've got the grid set to allow updates/Adds/deletes and I've tried different UpdateModes.
What am I missing?
Ok, I'll ask another way. What do I have to do to save it to the DB since the template doesn't do it? Is there a working example?
Hi Sean,
The grid has no interaction with the data base. It only deals with the local data source. Since you mentioned you are getting your data using a DataAdapter, that would imply you are binding the grid to a DataTable or DataSet. Whether you are using a RowEditTemplate or editing the rows directly in-place makes no difference. The grid only deals with the DataSet/DataTable.
Typically, in a case like this, you would use the DataAdapter (the same one you used to get the data) to push those changes to the back end. That's really outside the scope of our support, since it has nothing to do with the grid, and it's well-documented by Microsoft as part of the DotNet framework. Just to point you in the right direction, a quick google search turned up some instructions here that you might find helpful.