Copy/Paste row headers and column headers

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.

3 Replies

AD Administrator Syncfusion Team October 25, 2004 02:55 PM UTC

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


KP Ketan Parekh 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; >


AD Administrator Syncfusion Team 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.

Loader.
Up arrow icon