Dataset - Cancel not allowed
Publicado: Sab Jun 23, 2007 7:23 am
Hi,
I have a DBBrowse and DBNavigator linked to DbfDataset. All operations like Append,
Delete,Edit and navigation are OK. I have a problem, when the browser is in append or edit
mode. Pressing the Cancel button on the DBNavigator in this moment, I get this message
from dataset:
Invalid use of 'Cancel', set must be on 'Edit' or 'AddNew' mode[#0]
On procedure: TDDBROWSE:CANCELEDIT line 1041.
and the changes (or new record) are saved. When I teminate the edit process pressing the
ESC key, it works like excepted: changes are lost, record is not saved.
In the DBNavigator are defined:
:OnClickEdit := {|| ::oDBBrowse1:Edit()}
:OnClickInsert := {|| ::oDBBrowse1:Append()}
What is the reason of this behaviour and how to avoid it?
Gejza
I have a DBBrowse and DBNavigator linked to DbfDataset. All operations like Append,
Delete,Edit and navigation are OK. I have a problem, when the browser is in append or edit
mode. Pressing the Cancel button on the DBNavigator in this moment, I get this message
from dataset:
Invalid use of 'Cancel', set must be on 'Edit' or 'AddNew' mode[#0]
On procedure: TDDBROWSE:CANCELEDIT line 1041.
and the changes (or new record) are saved. When I teminate the edit process pressing the
ESC key, it works like excepted: changes are lost, record is not saved.
In the DBNavigator are defined:
:OnClickEdit := {|| ::oDBBrowse1:Edit()}
:OnClickInsert := {|| ::oDBBrowse1:Append()}
What is the reason of this behaviour and how to avoid it?
Gejza