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

Copying GroupingGrids

Hello,
I have a two part question about grouping grids. I want to copy a grid with detail levels (nested grid). All I need to do is to be able to paste these results into any text editor.

1) How do I copy a highlighted portion of the grid. I would only be copying either a nested portion of the grid or a header level portion. Basically I not sure how I would obtain the ranges for this copy.
2) How do I copy the whole grid, header and detail levels. Does the grid come with this functionality? Or will I have to go through my dataset?



1 Reply

SR Sri Rajan Syncfusion Team May 9, 2008 11:15 PM UTC

Hi ,

Thanks for your interest in Syncfusion products.

You have to use TableModel.Model.CutPaste.Copy() method to Copy the selections. Here is the code.

this.gridGroupingControl1.TableModel.Model.CutPaste.Copy();


To Copy the headers you need to set the following flags,

To Copy data along with Row Header
>>>>

this.gridGroupingControl1.TableModel.CutPaste.ClipboardFlags |= GridDragDropFlags.RowHeader;


To Copy data along with Column Header
>>>>

this.gridGroupingControl1.TableModel.CutPaste.ClipboardFlags|= GridDragDropFlags.ColHeader;


To select range of cells and copy to clipboard
>>>>>
this.gridGroupingControl1.TableModel.SelectedRanges.Add(GridRangeInfo.Cells(1,1,5,3));
this.gridGroupingControl1.TableModel.Model.CutPaste.Copy();


Please let me know if this helps.

Best Regards,
Srirajan



Loader.
Live Chat Icon For mobile
Up arrow icon