469,573 Members | 1,655 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

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 2578
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
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.