Home Forums WinForms controls Xceed Grid for WinForms Grid Validation Reply To: Grid Validation

User (Old forums)
Member
Post count: 23064

Jenny,

regarding the validation error. I did not use the e.cancel or leavingedit etc… i just call a method when the user presses a button.. HOwever, when the user enters the correct data for the second time, the error icon or message does not disappear.. Why? This is the method i will call:

private int CheckRequired(ArrayList ar, Xceed.Grid.DataRow dr)
{
int noDTErrors=0;
for(int i=0;i<ar.Count;i++)
{
try
{
if(ar[i].ToString().Trim().Equals(“”))
{
this.validator.SetValidationError(dr.Cells[“Scanned”],”Required Field”);
++noDTErrors;
}

}
catch(Exception x)
{
this.validator.SetValidationError(dr.Cells[“Scanned”],”Required Field”);
++noDTErrors;
}

}
return noDTErrors;
}

Imported from legacy forums. Posted by peyton (had 6425 views)