By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,759 Members | 1,727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,759 IT Pros & Developers. It's quick & easy.

Cancel Changes

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.