I have bound several textboxes to different rows in a DataTable, like this:
txtCurLevel.DataBindings.Add("Text", dtTop, "CURR LEVEL");
txtNewLevel.DataBindings.Add("Text", dtTop, "NEW LEVEL");
txtProduct.DataBindings.Add("Text", dtTop, "P LINE");
txtCurRev.DataBindings.Add("Text", dtTop, "CURR REV");
This binding seems to work, that is, when the user edits a textbox, upon leaving the field (validation), this is propogated to the datatable property. Likewise, if I do this:
dtTop.Rows[0]["CURR REV"] = "New text";
Then the textbox control updates to show that immediately. What I'm having trouble with is that after this statement:
VisDataObject vdo = new VisDataObject();
dtTop = vdo.GetPartmasterInfo2(pn);
I am not getting any updates showing in the textboxes, even though I have verified that the datatable dtTop now has completely different data in it. It seems like the datatable is not firing an INotifyPropertyChanged event to tell the textboxes to update.
Is there a way to resolve this, other than re-creating the txtbox bindings every time I update the DataTable?
Please Help!!