Hello everyone, I have a datagrid question I hope you can help me with. Let me explain:
I have a datagrid that is bound to a client side ADO recordset. The user is required to press a toolbar button before she is able to edit cells in the datagrid. After pressing the toolbar button, all cells in the datagrid may be modified. I use the DataGrid1_BeforeUpdate event to validate the new data. This works great when the user moves around the datagrid. However, if the user inputs invalid data in a cell, and then presses the toolbar button to exit “edit mode” the application generates an error: “Multiple-step operation generated errors. Check each status value.” The toolbar_click event doesn’t have a chance to fire before the error is generated, nor does datagrid1_validate or beforeupdate. The invalid data can be any value that exceeds the max value for the datatype in the database (Access), e.g. too large a number for an Integer field, or too many characters for a length-limited text field, etc.
For some reason the DataGrid1_BeforeUpdate event doesn’t fire when clicking on the toolbar but the invalid data is put somewhere that causes the error to be generated.
Any idea what I am doing wrong?
TIA
I have a datagrid that is bound to a client side ADO recordset. The user is required to press a toolbar button before she is able to edit cells in the datagrid. After pressing the toolbar button, all cells in the datagrid may be modified. I use the DataGrid1_BeforeUpdate event to validate the new data. This works great when the user moves around the datagrid. However, if the user inputs invalid data in a cell, and then presses the toolbar button to exit “edit mode” the application generates an error: “Multiple-step operation generated errors. Check each status value.” The toolbar_click event doesn’t have a chance to fire before the error is generated, nor does datagrid1_validate or beforeupdate. The invalid data can be any value that exceeds the max value for the datatype in the database (Access), e.g. too large a number for an Integer field, or too many characters for a length-limited text field, etc.
For some reason the DataGrid1_BeforeUpdate event doesn’t fire when clicking on the toolbar but the invalid data is put somewhere that causes the error to be generated.
Any idea what I am doing wrong?
TIA