DataGrid Question.

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
 
E

Eric Cherng

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top