I don't fully understand control binding in c# programs and wonder if
someone could clarify things for me.
I have two related tables ...
Parent: USERS (names)
Child: USER_CONTACT (telephone numbers, etc)
To the child table I've bound several textboxes as follows ...
myTextbox.DataBindings.Add("Text", ds.USERS, "USER_USERCONTACT.FIELD_NAME");
All of this works great. My problem is updating the datasource with changes
made to the textbox values. Specifically, the routines below successfully
pass updates to the datasource just once. After that, in spite of making
more edits, the routines don't pass changes back to the datasource.
Here are the main events in the code ...
BindingContext[ds.USERS, "USER_USERCONTACT.FIELD_NAME"].EndCurrentEdit();
daUSERS.Update(ds.USERS);
daUSERS.Fill(ds.USERS);
daUSERContact.Update(ds.USER_CONTACT);
daUSERContact.Fill(ds.USER_CONTACT);
Since my controls remain bound through the update and refill I assume that
maybe "EndCurrentEdit()" has ended my editing session and, for additional
editing, I need to somehow "begin edit." It's at this point that I realize
the greater problem is my not having any idea what I'm doing!
Thanks in advance for advice.