The following is my code:
void ParentGrouping_SourceListRecordChanged(object sender, Syncfusion.Grouping.RecordChangedEventArgs e)
{
......
e.Record.SetValue("ID", -e.OldIndex);
......
}
I found if I set value for the field "ID",then after the end of this event ,there will be no change in grid.
If I remove that line ,there will be a new row added in grid,i accept.
I want to modify "ID" to a random number due to Column "ID" linked child table to parent,if I don't do this,I can only New one parent record once.
Please help me!
HA
haneefm
Syncfusion Team
May 30, 2007 05:41 PM UTC
Hi Ken,
You can handle the CurrentRecordContextChange event to modify the relation field values in a grid. Here is a code snippet.
private void gridGroupingControl1_CurrentRecordContextChange(object sender, Syncfusion.Grouping.CurrentRecordContextChangeEventArgs e)
{
if( e.Action == CurrentRecordAction.EndEditCalled )
e.Record.GetRecord().SetValue("D",1222);
}
Best regards,
Haneef