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

contextmenustrip copy paste

Thread ID:





64466 Jul 20,2007 07:58 PM UTC Jul 20,2007 09:05 PM UTC WinForms 1
Tags: GridControl
Asked On July 20, 2007 07:58 PM UTC

I'm trying to implement a contextmenustrip that can cut, copy, and paste. I have the following code that creates the contextmenustrip for the databoundgrid.

databoundgrid.contextmenusstrip = this.contextmenustrip

How do I get the selected area from the grid and copy to the clipboard? Thanks!

haneefm [Syncfusion]
Replied On July 20, 2007 09:05 PM UTC

Hi Coder12345,

You can achieve this using CutPaste.CopyTextToClipboard() method, which takes GridRangeInfoList as the argument. Below is the code snippet:

gridControl1.CutPaste.CopyTextToClipboard(gridControl1.Selections.Ranges); //For text
///gridControl1.CutPaste.CopyCellsToClipboard(gridControl1.Selections.Ranges,true); //For styles

Also you can do this by calling the CutPaste.Copy() method in a grid. It copies the selected ranges in a grid.


Best regards,


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