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.
Syncfusion Feedback

Copy/paste of header cells

Thread ID:

Created:

Updated:

Platform:

Replies:

35083 Sep 22,2005 12:58 PM UTC Sep 30,2005 03:08 PM UTC Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 22, 2005 12:58 PM UTC

I would like to be able to select a range of cells (including the row/col headers), copy them, and then paste them into Excel. However, the default behavious only copies the standard cells, not the headers. Is there any quick way round this, or do I have to write my open copy/paste code? Thanks Akash

Administrator [Syncfusion]
Replied On September 22, 2005 01:32 PM UTC

Hi Akash, You can use the ClipboardCopy event to add the column headers to the ranges being copied. Below is a snippet. private void Model_ClipboardCopy(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e) { if(!e.RangeList.AnyRangeContains(GridRangeInfo.Row(0))) { e.ClipboardFlags |= GridDragDropFlags.ColHeader; e.RangeList.Add(GridRangeInfo.Row(0)); } } Best regards, Jay N

Administrator [Syncfusion]
Replied On September 30, 2005 03:08 PM UTC

Thanks Jay, All I needed was the clipboardflags settings - I only want to include the row/col headers if the user has selected them. Akash >Hi Akash, >You can use the ClipboardCopy event to add the column headers to the ranges being copied. Below is a snippet. > > >private void Model_ClipboardCopy(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e) >{ >if(!e.RangeList.AnyRangeContains(GridRangeInfo.Row(0))) >{ >e.ClipboardFlags |= GridDragDropFlags.ColHeader; >e.RangeList.Add(GridRangeInfo.Row(0)); >} >} > > >Best regards, >Jay N

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.

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

;