Page 1 of 1

Canceling changes onscroll

Posted: Tue 05 Feb 2013 10:55
by Milan Bacik
I am trying something what was discused earlier here http://forums.devart.com/viewtopic.php? ... 33&p=87134 The problem is when user dont want to save changes than I want to all changes to current record was discarded and cursor is scrolled. I am trying to call Cancel() but than Post method generate INSERT and SQL throws error on unique index.
Underlaying component is TOraQuery and select is from 2 tables. User can save record by calling separate method with Save button.

Re: Canceling changes onscroll

Posted: Tue 05 Feb 2013 15:06
by AlexP
Hello,

If you want to cancel insertion, you should use the Abort method instead of Cancel, as it is shown in the last post of the specified topic.

Re: Canceling changes onscroll

Posted: Tue 05 Feb 2013 17:40
by Milan Bacik
No its update. Dataset is in dsEdit state. I dont know why TOraQuery generate INSERT after I call Cancel inside BeforePost.

Re: Canceling changes onscroll

Posted: Wed 06 Feb 2013 13:51
by AlexP
Hello,

Please send a small sample demonstrating the problem to alexp*devart*com

Re: Canceling changes onscroll

Posted: Fri 08 Feb 2013 13:31
by AlexP
Hello,

Thank you for the information, we have reproduced the problem and will try to fix it in the nearest version.