Hi Asaf,
Thanks for posting.
Regarding this issue, we can use C# "is" operator to determine if
e.Exception is of type ConstraintException. Code snippet listed below:
if ((e.Exception) is ConstraintException)
{
DataGridView view = (DataGridView)sender;
view.Rows[anError.RowIndex].ErrorText = "an Constraint error";
view.Rows[anError.RowIndex].Cells[e.ColumnIndex].ErrorText = "an
Constraint error";
e.ThrowException = false;
}//what ever statement you like
Hope this helps!
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Asaf - 10 Feb 2006 12:18 GMT
Hi Jeffrey,
Thanks for your help :-)
Regards,
Asaf
> Hi Asaf,
>
[quoted text clipped - 19 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 13 Feb 2006 01:59 GMT
You are welcome
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.