Data binding

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I have a Windows form with several controls on it with
those controls being bound to a dataset. If I change the
value in one of the textboxes, the value is changed in
the dataset. But the HasChanges property of the dataset
comes back false and any update using the DataAdapter
comes back with 0 records updated. I can in code use
dataset.datatable.item(0).fieldname = "whatever" and then
execute the dataadapter's update command and it runs
fine. Why when I make a change in one of the controls on
the form the dataset does not recognize that the row has
changed eventhough I can see that the row has the new
value that was entered into the form control? Does the
dataset still think I am making changes to the row? Do I
somehow have to tell the dataset that I am through making
changes to the row? Any help would be good. Thanks.
 
I was able to find what I needed. I am using an instance
of the CurrencyManager and then use the EndCurrentEdit
method to put my changes in the dataset.
 
I had the same problem, and I used the same solution as
yours.
Though if you use a datagrid, you don't have to call the
EndCurrentEdit method of the currency manager concerned.
I wish it were more conistent in its approach of making
the dataset 'dirty'.
 
Back
Top