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.

gridgroupingcontrol

Thread ID:

Created:

Updated:

Platform:

Replies:

118149 Feb 5,2015 12:08 AM Feb 8,2015 10:31 AM Windows Forms 1
loading
Tags: GridGroupingControl
pravin
Asked On February 5, 2015 12:08 AM

how to copy selected column value of each record from ggc to datatable

Muthukumar Kalyanasundaram [Syncfusion]
Replied On February 8, 2015 10:31 AM

Hi Pravin,

 

Thank you for your interest in Syncfusion products.

 

If you want to copy the selected column in GridGroupingControl, you can use “GridColumnDescriptor” class. Using this class to get details of selected record by using GetValue method of Record class. Please refer the below code,

 

Code:
private void buttonAdv1_Click(object sender, EventArgs e)

{
foreach (SelectedRecord selRec in this.gridGroupingControl1.Table.SelectedRecords)
{
for (int i = 0; i < this.gridGroupingControl1.TableDescriptor.Columns.Count; ++i)
{
GridColumnDescriptor vcd = this.gridGroupingControl1.TableDescriptor.Columns[i];
if (i != 0)
s += '\t';
s += selRec.Record.GetValue(vcd.Name).ToString(); }
s += Environment.NewLine;
}
Clipboard.SetDataObject(new DataObject(s), true);
}
}

 

Please let us know if you have any concern.

 

Regards,

Muthukumar K


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.

;