Hi Tine,
Sorry for the delay in getting back to
you.
Query: Validation during editing. ?
To achieve your requirement of performing
the validation during editing we suggest you to use “CurrentRecordContextChange”
event and check the validation for the column you would like to perform during “EndEditCalled”
Action. If the validation fails set the e.Cancel to true and display the
validation message. Please refer below code snippet for further details.
[aspx.cs]
protected
void Page_Load(object
sender, EventArgs e)
{
this.GridGroupingControl2.CurrentRecordContextChange
+= new CurrentRecordContextChangeEventHandler(GridGroupingControl2_CurrentRecordContextChange);
. . .
}
void
GridGroupingControl2_CurrentRecordContextChange(object
sender, CurrentRecordContextChangeEventArgs
e)
{
// Raise when a row in the GridGroupingControl is updated.
if (e.Action == CurrentRecordAction.EndEditCalled)
{
//FOR REQUIRED FIELD VALIDATION
object FieldIDValue = e.Record.GetRecord().GetValue("CustomerID");
if (FieldIDValue == null)
{
e.Cancel = true;
Label1.Text
= "Required Field Validator - Enter value for
CustomerID";
}
}
}
For your convenience we have prepared a
sample for the above scenario and it is attached below. Please refer to it.
Please let us know if you have any
concerns.
Regards,
Rakesh D
Validation GGC_ad77379.zip