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. Image for the cookie policy date
close icon

How can I copy / paste entire table including column headers?

I was using a basic syncfusion grid and it worked fine. I switched to a gridgrouping control for added functionality. Users need select entire copy, copy and paste it.

After switching gridgroupingcontrol, headers are no longer copy/pasted. I get the entire grid, all of the data, but the headers are missing. I have overriden the copy event:


this.m_exposuregridGroupingControl.TableModel.ClipboardCopy += new GridCutPasteEventHandler(TableModel_ClipboardCopy);

method:

void TableModel_ClipboardCopy(object sender, GridCutPasteEventArgs e)
{
e.ClipboardFlags = e.ClipboardFlags | GridDragDropFlags.ColHeader | GridDragDropFlags.Compose | GridDragDropFlags.Styles;

}


Event is called and settings are passed, but the column headers are not included in the copy/paste. If I try to copy/paste rowheaders using the above function, it works...but column headers are ignored. Could you pls help?

1 Reply

RC Rajadurai C Syncfusion Team November 10, 2009 10:24 AM UTC

Hi,

Thanks for your interest in Syncfusion Products.

With gridgroupingcontrol, the TableOptions.AllowSelection property allows user to select the entire table using mouse and copies the contents of the records and column headers while clipboard copy.

It would be fine to track the issue and find the cause for it, if you provide us a minimal sample reproducing the issue.

Regards,
Rajadurai

Loader.
Live Chat Icon For mobile
Up arrow icon