ST
stanleyj
Syncfusion Team
December 12, 2005 03:49 PM UTC
Hi James,
This could be tried in CurrentRecordContextChange handler. You can do whatever tests you want on e.Record. If they fail, then set e.Cancel = true. Below is a snippet that does not let you leave the record unless the value in Col1 is bigger than 20.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if(e.Action == CurrentRecordAction.EndEditCalled)
{
Record rec = e.Record as Record;
if(rec != null)
{
object o = rec.GetValue("Col1");
if(o == null || ((int) o) < 20)
{
e.Cancel = true;
}
}
}
}
Best regards,
Stanley
SA
Salim Amin Padela
December 13, 2005 08:14 AM UTC
Fine.
What i was expecting is something like ValidationControls just like we have in ASP.Net. Like i can mention the type of validation in the Property of Column and it should validate it automatically for every cell in that column.