DataGrid Question.

  • Thread starter Thread starter Hex Adezimal
  • Start date Start date
H

Hex Adezimal

My DataGrids DataSource (a DataSet) is not updated after a cell in the
DataGrid is edited. If I edit a cell and then click on another row in the
DataGrid the DataSource is then updated with the changes. How can I force
an update of the DataSource if the users cursor is still in the cell they
have just edited?

Hex
 
Hex,

I can see how this is the behavior of DataGrid. I'm guessing this is because
DataGrid does not know when you are done editing the cell until you click or
move out of the cell. Therefore if you want to have the cell automatically
save, then you will need to respond to the events and manually update the
DataGrid's corresponding DataSet. I'm not sure if there are any higher level
events for this (besides CurrentCellChanged, which probably isn't what you
want) so you may have to handle lower level events (such as KeyDown).

Eric
 
Back
Top