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 and paste the Nested table records from the GridGroupingControl to Excel?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: April 30, 2011 |
Last Revised Date: March 6, 2015

To copy and paste the Nested table records from the GridGroupingControl to Excel, you must first copy the Grid content to the Clipboard. This is achieved by handling the ClipboardCopy event. In the event, the selected records are copied by iterating through the Nested table collection by using the GetTable method. This iterating loop spans through their columns to get values. These values are appended to a string variable and finally copied to the Clipboard as strings by using the Clipboard.SetDataObject() method.

  • ClipboardCopy Event:

The ClipboardCopy event is fired when the content is copied from the Grid’s TableModel.



  • CopySelectedRecords Method:

This method is used to copy the Selected Records and add it to the Clipboard object as a string.



  • CopySelectedRecordsToBuffer Method:

In this method, the selected records are added in the buffer string with the visible column descriptor. It has the same appearance as the nested table records when the Clipboard content is pasted to the Excel sheet.



The following screenshot displays the selected Record copied with the nested Records to the clipboard and then to the Excel sheet.


Figure 1: The selected Record is copied with the nested Records to the clipboard

Figure 2: Clipboard content copied to the Excel sheet

Sample Links:



2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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