This happens when i'm trying to add new record in the datagrid but with some of the fields left unfilled then update or move to another row.
This error comes from the fact that there are fields in the source table in which the 'Required' property is set to 'Yes'. When this error is raised, the DataError parameter ( in the datagrid's Error event) has the value 6154. My objective is merely to recover from this error. Recovery may include
1. Cancel the action
2. In the case of addnew, Clear the contents of the row. Or, in the case of text edit, set back to its original value.
3. Position the cursor to the last valid row.
How do i achieve these steps?
CUrrently, i do recover manually by doing the following steps:
1. Click or place the mouse cursor at the datagrid's Recordselector since clicking on a row or column will trigger back the error message.
2. Press the ESC key. This seems to cancel the action and clear the contents of the added new row and, with the cursor positioned at the last row.
What have i tried?
1. In order not to display the error message, in the datagrid1_Error event, i set the "Response=0" when the "DataError=6154". But, i dont know how to cancel the action and clear the contents of the added new row.
2. In the DataGrid1_BeforeUpdate event, I set "Cancel=True" when the 'Required' column-fields are blank or not numeric.
The datagrid has the DataMember set to the the child command (master/detail) created in the DataEnvironment.
I really need your help.
This error comes from the fact that there are fields in the source table in which the 'Required' property is set to 'Yes'. When this error is raised, the DataError parameter ( in the datagrid's Error event) has the value 6154. My objective is merely to recover from this error. Recovery may include
1. Cancel the action
2. In the case of addnew, Clear the contents of the row. Or, in the case of text edit, set back to its original value.
3. Position the cursor to the last valid row.
How do i achieve these steps?
CUrrently, i do recover manually by doing the following steps:
1. Click or place the mouse cursor at the datagrid's Recordselector since clicking on a row or column will trigger back the error message.
2. Press the ESC key. This seems to cancel the action and clear the contents of the added new row and, with the cursor positioned at the last row.
What have i tried?
1. In order not to display the error message, in the datagrid1_Error event, i set the "Response=0" when the "DataError=6154". But, i dont know how to cancel the action and clear the contents of the added new row.
2. In the DataGrid1_BeforeUpdate event, I set "Cancel=True" when the 'Required' column-fields are blank or not numeric.
The datagrid has the DataMember set to the the child command (master/detail) created in the DataEnvironment.
I really need your help.