constraints


Hi,

I created a constraint on my table in sql by using:

ALTER TABLE myTable ADD CONSTRAINT Constraint1 CHECK (myColumn > 100);

Is there some way to get the databoundgrid to recognize this constraint on the table and warn the user if they enter in a number less than 100? I noticed that the grid by default will warn the user if they enter in a value that is too long for the maximum length allowed by a column. Is there something similar for check constraint on a table?

Thanks!



1 Reply

HA haneefm Syncfusion Team July 30, 2007 03:43 PM UTC

Hi Code123,

This ConstraintException has to be handled by the underlying datasource of the grid(ie DataSet/DataTable). Grid does not raise any events for this. If you want to validate the Check Constraint, you need to handle the validating events of the grid. Please refer to the below KnowledgeBase article for more details.

What are the different validation events and event members? When are they triggered and how are they used?

Best Regards,
Haneef

Loader.
Up arrow icon