L
lgbjr
Hi All,
I've posted this question on the ComponentOne news group, but I thought it
couldn't hurt to post it here as well, since, I’m assuming, some others out
there are using the C1 controls for VB.NET.
This is what I have:
VB.Net form with a c1FlexGrid and some c1Textboxes
C1ExpressConnection to an Access DB
C1ExpressTable
C1dbNavigator
The C1FlexGrid and C1textboxes are bound to the C1expresstable
Column3 (in the C1expresstable is a unique index, calculated with the
expression [column1]+'-'+[column2].
So far, this all works. When a new row is added, the user enters data in the
textbox bound to column1, then column2 and the calculation expression fills
column3. However, if the calculation produces a non-unique value for
column3, an error (Constraint Exception) is produced. The error is not
actually the problem (since I expect the error). My problem is figuring out
how to catch the error, so that I can show my own error message, clear the
current values in Col1, Col2, and Col3, and set the focus back to the
textbox bound
to column1. Does that make sense?
I've looked through the docs and tutorials and found enough to know that I
can catch the error and do what I want to do. Unfortunately, I didn't find
enough information (or an example) to actually implement the solution.
All help and comments will be greatly appreciated!!
Thanks
Lee
I've posted this question on the ComponentOne news group, but I thought it
couldn't hurt to post it here as well, since, I’m assuming, some others out
there are using the C1 controls for VB.NET.
This is what I have:
VB.Net form with a c1FlexGrid and some c1Textboxes
C1ExpressConnection to an Access DB
C1ExpressTable
C1dbNavigator
The C1FlexGrid and C1textboxes are bound to the C1expresstable
Column3 (in the C1expresstable is a unique index, calculated with the
expression [column1]+'-'+[column2].
So far, this all works. When a new row is added, the user enters data in the
textbox bound to column1, then column2 and the calculation expression fills
column3. However, if the calculation produces a non-unique value for
column3, an error (Constraint Exception) is produced. The error is not
actually the problem (since I expect the error). My problem is figuring out
how to catch the error, so that I can show my own error message, clear the
current values in Col1, Col2, and Col3, and set the focus back to the
textbox bound
to column1. Does that make sense?
I've looked through the docs and tutorials and found enough to know that I
can catch the error and do what I want to do. Unfortunately, I didn't find
enough information (or an example) to actually implement the solution.
All help and comments will be greatly appreciated!!
Thanks
Lee