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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to copy selected rows including hidden columns from Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl

Thread ID:





71413 Jan 30,2008 06:53 AM UTC Oct 23,2009 04:28 PM UTC WinForms 3
Tags: GridControl
Asked On January 30, 2008 06:53 AM UTC

How to copy selected rows including hidden columns from Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl?

Replied On January 30, 2008 06:56 AM UTC

We would like to copy the records to the clipboard.

SubhaSheela R [Syncfusion]
Replied On February 5, 2008 08:41 AM UTC

Hi Katherine,

Thank you for using Syncfusion products.

You can copy the selected row to clip board including hidden cell by getting all the columns in the GridGrouping control using GridColumnDescriptor. After getting all the columns, you can get details of selected record by using GetValue method of Record class. Below is the code snippet:

private void CopySelectedRecords()
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 refer the sample available in the link below and let me know if it helps:

http://websamples.syncfusion.com//samples/ Grouping.Windows/F71413/main.htm

Subhasheela R

Santosh U
Replied On October 23, 2009 04:28 PM UTC

Hi Subhasheela,

I have downloaded and used your code It works well. I have modified it for visiblecolumns only.

Now my columns are of type Combo Box so I get the value instead of display text (which I am fine with).

I want to paste this same copied rows in the same grid below (where AddNewRecord is there, How can we achieve this.

Please help,
Santosh U


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon