GGC Selected Records Get Cell Value

I'm using gridgroupingcontrol.

I want to get the values of one column in selected records. How can I do that..?

eg-: if i have a column called skill, I want to get all the skills in selected records.


1 Reply

AD Administrator Syncfusion Team March 27, 2008 07:44 PM UTC

Hi Apwickrama,

In a flat groupinggrid, you can get the selected record's column value by using the Record.GetValue method. Below are the codes:

GridTable gt = this.gridGroupingControl1.Table;
foreach(SelectedRecord rec in gt.SelectedRecords)
{
Console.WriteLine(rec.Record);
Console.WriteLine(rec.Record.GetValue("Skill"));
}

With the nested tables, you need to get the child table you want, and do the same type of thing. Here is a code snippet

GridTable gt = this.gridGroupingControl1.GetTable("ChildTable");
foreach(SelectedRecord rec in gt.SelectedRecords)
{
Console.WriteLine(rec.Record);
Console.WriteLine(rec.Record.GetValue("Skill"));
}

Best Regards,
Haneef


Loader.
Up arrow icon