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
close icon

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);

Live Chat Icon For mobile
Up arrow icon