protected void MyGrid_RowValidating(object sender, ASPxDataValidationEventArgs e)
{
if ((e.NewValues[2] as string).Trim().Length < 42)
{
e.Errors[MyGrid.Columns[2]] = "Too short!";
}
}
"Too short!" will end up in a tooltip one sees upon mousing over the red octagon. Associate this event with your DevExpress grid like so:
MyGrid.RowValidating += MyGrid_RowValidating;
No comments:
Post a Comment