How to detect changes

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hello

On a form, I want the user to be prompted if he moves to a different record
to ask him if he wants to commit his changes.

They are moving from Access and very used to things saving on its own.

So I want to make sure they are prompted for information to be saved, if
they change to another record or a tab on the form.

Do we just call newds = ds.GetChanges() and check if newds is null ?

Are there any examples out there ?

Thanks
HS
 
HS,

If that ds.getchanges works than there is instead of that
ds.haschanges

I hope this helps,

Cor
 
Hi,

Unfortunatelly it is not that easy.
The current row being edited is buffered and you won't see the change in
dataset until you move to another record or you explicitly commit a change
with CurrencyManager.EndCurrentEdit.
You might also catch DataTable.ColumnChanged/Changing events to catch the
modifications.
 
Back
Top