views:

220

answers:

1

I am using the CellEndEdit event in DataGridView to detect when a user has finished editing a cell. I want to post the results back to the database. The datagridview is bound to a DataView. I retain the original DataAdapter (SQLDataAdapter) used to fill the dataset and thus display the data to the user. All update and select commands are defined when I create the adapter initially. Also, when a user makes one initial update to a cell in the datagridview, the update posts to the database. However, subsequent updates do not post. It is as if the row state is still showing unchanged. All I am doing is calling DataAdapter.Update(myDataSet, "TABLE");

Do I need to reset something somewhere?

Thanks

A: 

Apparently it won't work if you put the DataAdapter.Update code in the CellEndEdit event for the datagridview. So, I added a menu item with a Click event and pasted the Update code there. It works great. There must be some underlying reason why CellEndEdit will not work, but I do not know why at the moment.

0A0D