UpdateMode is OnRowChangeOrLostFocus
My tableadapter has insert and update methods.
How do I get the updates to happen, so I can have update/insert behavior, like an Access datasheet?
Hi,
I'm not sure I understand your question.
I'm not familiar with any TableAdapter class. It sounds like maybe you mean the DataAdapter.
The methods on the DataAdapter have nothing to do with the grid. The grid only interacts with the local data source. So I assume you are using a DataTable or DataSet and filling it with a TableAdapter in this case.
If you need information on how to use the DataAdapter to write the local changes back to the database, then you will need to consult Microsoft's documentation. The grid is not involved in that part of the process.
OK, so the bottom line is I have to determine the appropriate events and use them to force the updates on the dataset in my code?
In the DotNet Windows Forms world, you would typically do your updates in batches. It's generally not very efficient to update the back end every time a row or cell changes.
But yes, you are essentially correct. The grid does not interact with the back end directly, so just as it is up to you to retrieve the data from the back end and provide a data source to the grid, it is also up to you to send the changes back to the back end.
Thanks. Got that implemented yesterday.