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

Copying & Pasting header into excel

When I highlight and copy a grid by selecting all the columns (click on header and drag), and then paste it into excel, everything gets copied except the headers. Is this just a mmatter of an attribute setting?

1 Reply

AD Administrator Syncfusion Team August 8, 2003 09:19 PM UTC

To include the headers, you need to set a flag in the ClipboardCopy event handler.
' in formload
AddHandler Me.gridDataBoundGrid1.Model.ClipboardCopy, AddressOf HandleCopy

’......
Private Sub HandleCopy(sender As Object, e As GridCutPasteEventArgs)
   e.ClipboardFlags = e.ClipboardFlags Or GridDragDropFlags.ColHeader
End Sub ’HandleCopy

Loader.
Live Chat Icon For mobile
Up arrow icon