How do i copy Datagrid to clipboard problem

I am trying to copy the data from Datagrip to Clipboard. i have a button on the form if i click on the button the datagrid data should get copy into a clipboard and if i open the excel and do Ctrl - V then the copied data should get paste to Excel file. How do i achieve this. facing problem. does any one help me?

1 Reply

AD Administrator Syncfusion Team December 31, 2003 06:12 AM UTC

If you are using a GridDataBoundGrid, you can use the Model.CutPaste.CopyTextToClipboard method. GridRangeInfo range = GridRangeInfo.Cells(1, 1, this.gridDataBoundGrid1.Model.RowCount - 1, this.gridDataBoundGrid1.Model.ColCount); GridRangeInfoList rangeList = new GridRangeInfoList(); rangeList.Add(range); this.gridDataBoundGrid1.Model.CutPaste.CopyTextToClipboard(rangeList);

Loader.
Up arrow icon