Row Selection in GGC

Syncfusion 5.1
VS 2005

When the user selects a row on GGC, how do I capture the row information and then re-apply it(re-select the same row) when the user sorts or filters the GGC?

Thanks

1 Reply

HA haneefm Syncfusion Team October 2, 2007 07:29 PM UTC

Hi Shek,

Bydefault, the groupinggrid keeps the selected records when sorting the grid by column. Here is a minimal sample that shows this task.

Sample : SeelctionGGC.zip

If you want to get the selected records then use the Table.SelectedRecords collection property and use the selectedRecord.Record.GetData method to get the datarow information of selected record. Below are the codes:

foreach (SelectedRecord srec in this.gridGroupingControl1.Table.SelectedRecords )
{
DataRowView row = srec.Record.GetData() as DataRowView;
Console.WriteLine(row.Row["Col1"]);
Console.WriteLine(srec.Record.Info);
}

Best regards,
Haneef

Loader.
Up arrow icon