EndCurrentEdit causes the dataset.HasChanges() become TRUE

  • Thread starter Thread starter dev guy
  • Start date Start date
D

dev guy

Hi

I have a form and controls (no datagrid) on it bound to a typed dataset.
On Save button ... I have called EndCurrentEdit and then ds.HasChanges().
Even though no changes are made to the fields on the form, the call to
EndCurrentEdit() causes ds.HasChanges() to become TRUE.

If I do not call EndCurrentEdit() , then even if I do make changes into the
form fields, the HasChanges() remains FALSE.

can somebody throw some light on the same?

warm regards
 
Hi,

There is a CurrencyManager that with help from DataRow holds intermediate
values before commiting - that's why you don't see HasChanges before you
commite those values (either by calling EndCurrentEdit or moving Position).
If you don't want to raise HasChanges then you might use CancelCurrentEdit
method instead.
 
Back
Top