Hi Mitul,
Thank you for your update.
To maintain Selected records after reinitialize of the Grid , you need to collect all Row Index’s of selected records and programmatically select all those records by explicitly use of below code snippet.
foreach (SelectedRecord Rec in this.gridGroupingControl1.Table.SelectedRecords)
{
if (Rec.Record.Kind == DisplayElementKind.Record)
{
Record record = Rec.Record;
objPersistSelectRecords.Add( record) ;
}
}
this.gridGroupingControl1.Reinitialize();
for (int j = 0; j < objPersistSelectRecords.Count; j++)
{
Record record = objPersistSelectRecords[j] as Record;
int RowIndex = this.gridGroupingControl1.Table.NestedElements.IndexOf( record );
Record OriginalRecord = this.gridGroupingControl1.Table.NestedElements[RowIndex].GetRecord();
if (OriginalRecord.Kind == DisplayElementKind.Record)
{
if (OriginalRecord.ParentGroup != null)
OriginalRecord.ParentGroup.IsExpanded = true;
OriginalRecord.SetSelected(true);
}
}
Please refer the sample for implementation.
Sample:
http://websamples.syncfusion.com/Samples/Grid.Windows/F72845_N/main.htm
Please let me know if you need further assistance.
Best regards,
Johnson