SaintJimmy
Member
- Joined
- Jul 7, 2006
- Messages
- 24
- Programming Experience
- 5-10
I've got 2 controls on a form... a DataGridView and a TextBox.
The DataGridView is bound to a BindingSource object, which I'll call MyBindingSource, which is bound to a DataSet. I'm handling the CurrentItemChanged event for MyBindingSource, and in the handler I call a function of a TableAdapter called FillByID, which is passed the value of the ID field of the currently selected item in the DataGridView. This action fills a table in my DataSet with the only record (if any) corresponding to that ID. That table is bound by another BindingSource object, and the Message field is bound to the Text property of the TextBox control.
The problem comes in when I edit the text. It's supposed to submit the changes to the DataSet on validation, but this is apparently not happening. After validation happens on the TextBox, I call HasChanges on the DataSet, and it returns false.. every time without fail.
What's going wrong? It's probably something really simple.
The DataGridView is bound to a BindingSource object, which I'll call MyBindingSource, which is bound to a DataSet. I'm handling the CurrentItemChanged event for MyBindingSource, and in the handler I call a function of a TableAdapter called FillByID, which is passed the value of the ID field of the currently selected item in the DataGridView. This action fills a table in my DataSet with the only record (if any) corresponding to that ID. That table is bound by another BindingSource object, and the Message field is bound to the Text property of the TextBox control.
The problem comes in when I edit the text. It's supposed to submit the changes to the DataSet on validation, but this is apparently not happening. After validation happens on the TextBox, I call HasChanges on the DataSet, and it returns false.. every time without fail.
What's going wrong? It's probably something really simple.