We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GGC Selected Records Get Cell Value

Thread ID:

Created:

Updated:

Platform:

Replies:

72589 Mar 27,2008 07:42 AM Mar 27,2008 03:44 PM Windows Forms 1
loading
Tags: Grouping
apwickrama
Asked On March 27, 2008 07:42 AM

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.


Administrator [Syncfusion]
Replied On March 27, 2008 03:44 PM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;