I wanted to make this available to others in the same boat - it took
me half a day to figure this out and I could not find it explicitly
stated anywhere (newsgroups, web or MSDN) though it is alluded to.
My situation - C#, SQL2000 using Windows forms
On my databound windows form (single record display), on edit the last
user control changed (textbox, combobox, checkbox, etc) was not being
updated without that last control losing focus (in fact several posts
across groups mention this as a solution, as well as subclassing
controls to utilitze TextChanged event or changing to another row if
using a datagrid).
The problem was I was posting the row changes to the dataset using the
EndEdit() method (Dataset.TableIndex.RowIndex.EndEdit()).
If you use the EndCurrentEdit() method (this.BindingContext[Dataset,
"Tablename"].EndCurrentEdit(), this particular issue goes away
(example - editing one control on your form without it losing focus,
then updating is now possible).
Fair warning - during my newsgroup travels some guy from MS (late 2001
post) advised that this method only be used with "complex" controls
such as datagrids - otherwise he recommended EndEdit(). Until I find
a downside to EndCurrentEdit(), it is my current choice.
If people with more experience (I have virtually none) with ADO .NET
would like to chime in about the downsides of EndCurrentEdit(), please