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.
Unfortunately, activation email could not send to your email. Please try again.

contextmenustrip copy paste

Thread ID:

Created:

Updated:

Platform:

Replies:

64466 Jul 20,2007 03:58 PM Jul 20,2007 05:05 PM Windows Forms 1
loading
Tags: GridControl
John
Asked On July 20, 2007 03:58 PM


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 05:05 PM

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.

gridControl1.CutPaste.Copy();//

Best regards,
Haneef

CONFIRMATION

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.

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.

;