Hi all
I am binding a DataRow to some controls on a form. When I've finished
editing the DataRow I click on a toolbar button to save the changes. If the
focus is on a particular control, the item in the DataRow does not update to
be the value of the control, for example, if I have a TextBox called
txtEntry which is bound to the Entry column of the DataRow, if the focus
remains on the TextBox while I click on the save button the DataRow("Entry")
is DBNull.
When the control loses focus, the DataRow is updated with the correct value,
so I'm left with a scenario when the users have to shift focus off the last
control before saving the data, which is obviously not a good thing. I have
tried calling the DataRow.EndEdit before the save but it still didn't update
with the correct value.
Has anyone else come across this behaviour? How do I deal with updating the
DataRow when the bound control does not lose focus before the save is made?
Kind Regards,
Steve.