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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy/Paste row headers and column headers

Thread ID:





20759 Oct 25,2004 12:30 PM UTC Mar 14,2006 11:14 AM UTC WinForms 3
Tags: GridControl
Desis Machino
Asked On October 25, 2004 12:30 PM UTC

I have a grid with may columns and rows including a Row Header and a Column Header. However, when I select mutilple cells, including row and col headers and perform a copy then paste into a text file, all the text of the selected cells are pasted except for the row and column headers. Is there a way for me to allow copy/pasting of the the headers as well.

Administrator [Syncfusion]
Replied On October 25, 2004 02:55 PM UTC

Try setting these flags in the ClipboardFlags property. this.gridDataBoundGrid1.Model.CutPaste.ClipboardFlags |= GridDragDropFlags.ColHeader | GridDragDropFlags.RowHeader;

Ketan Parekh
Replied On March 13, 2006 07:16 PM UTC

Is there a way to paste column headers when they are not selected. What I mean is, if I select rows 1,3,5 in columns 2,3, and 5 I want headers of only those columns to be pasted. Thanks. >Try setting these flags in the ClipboardFlags property. > > >this.gridDataBoundGrid1.Model.CutPaste.ClipboardFlags |= GridDragDropFlags.ColHeader | GridDragDropFlags.RowHeader; >

Administrator [Syncfusion]
Replied On March 14, 2006 11:14 AM UTC

Hi Ketan, The following code snippet, explains the way to include the respective column headers while copy and paste. private void Model_ClipboardCopy(object sender, GridCutPasteEventArgs e) { e.ClipboardFlags |= GridDragDropFlags.ColHeader; for(int i =0; i< this.gridDataBoundGrid1.Model.ColCount; i++) { if(e.RangeList.AnyRangeIntersects(GridRangeInfo.Col(i))) { e.RangeList.Add(GridRangeInfo.Cell(0,i)); } } } Let us know if this helps. Best regards, Madhan.


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

Live Chat Icon For mobile
Live Chat Icon