Using windows.forms, I have a tabcontrol with a listbox and several textboxes all bound to a datatableadapter. When the user selects a member in the listbox the corresponding textboxes are populated. The problem is that, when the user edits the text in a textbox it is not being written back to the datatable. So when they select a different member in the listbox their changes are lost. I'm trying to handle the textchanged event but cannot find how to update the datatable with the changes.
A:
I think you should handle the Leave event of the Textbox which is fired when the focus of the textbox is lost. Then you need to write the the change back to the database.
David
2009-10-27 17:36:22
I don't want to write to the database. I need to update the datatable but I can't figure out how to get to it.
2009-10-27 19:24:26
oops sorry. You use DataTable.Rows[rowIndex][columnIndex] = value
David
2009-10-28 14:14:56
that is the crux of the matter. I can see the binding source but not how to walk it to get to the datatable that is behind the texbox
2009-10-28 17:06:31