471,851 Members | 1,235 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,851 software developers and data experts.

Cancel Changes

Greetings Group:
I got a form with multiple controls that are bound to a dataset, with
two buttons & next/previous. Simply, add button adds a new record and
cancel button undo changes.

On add click event button:
Me.BindingContext(ds1.Tables("MyTable")).EndCurren tEdit()
Me.BindingContext(ds1.Tables("MyTable ")).AddNew()

On Cancel
Me.BindingContext(ds1.Tables("MyTable ")).CancelCurrentEdit()
''''' -??? ds1.Tables("MyTable ").RejectChanges()

Issue is that after click on Add the CancelCurrentEdit() undo changes
on some records as I do the next & previous. If I keep both
Cancelcurrent and Rejectchanges then it seems to restore back to
original Ok. Why do I need both? Help!

Ian

Jun 6 '07 #1
1 2657
InAdad,

The EndCurrentEdit pushes the data in the last used control into the
datatable
The RejectCurrentEdit undo's that probably, it is an instruction I never
used.
The Acceptchanges set all the set all rowstates to the ones they are
The Rejectchanges does the same after setting back the values to those after
the latest acceptchanges or fill with acceptchanges on after filling
(default setting)

Cor

<in*****@hotmail.comschreef in bericht
news:11**********************@j4g2000prf.googlegro ups.com...
Greetings Group:
I got a form with multiple controls that are bound to a dataset, with
two buttons & next/previous. Simply, add button adds a new record and
cancel button undo changes.

On add click event button:
Me.BindingContext(ds1.Tables("MyTable")).EndCurren tEdit()
Me.BindingContext(ds1.Tables("MyTable ")).AddNew()

On Cancel
Me.BindingContext(ds1.Tables("MyTable ")).CancelCurrentEdit()
''''' -??? ds1.Tables("MyTable ").RejectChanges()

Issue is that after click on Add the CancelCurrentEdit() undo changes
on some records as I do the next & previous. If I keep both
Cancelcurrent and Rejectchanges then it seems to restore back to
original Ok. Why do I need both? Help!

Ian

Jun 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Rachel Suddeth | last post: by
4 posts views Thread by martin | last post: by
Frinavale
13 posts views Thread by Frinavale | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.