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

CopyTextToClipboard method

Thread ID:





58357 Mar 22,2007 04:12 PM UTC Mar 23,2007 03:53 PM UTC WinForms 2
Tags: GridControl
Aaron Schaefer
Asked On March 22, 2007 04:12 PM UTC

Hi There,

I am having some trouble using this method. I am trying to copy the entire contents of a GridControl derived grid, but nothing is ending up in the clipboard, and the method returns false. Here is my code. Any idea why subsequent calls to Clipboard.HasText() would return empty?

/// This is just a convenience for client code. Just copies the entire grid to the clipboard.

public void CopyGridToClipboard()
GridRangeInfoList list = new GridRangeInfoList();
bool b = CutPaste.CopyTextToClipboard(list);

Administrator [Syncfusion]
Replied On March 22, 2007 05:03 PM UTC

Hi Aaron,

One way you can do this by using the GridRangeInfo.Cells method in a grid. Please try this code and let me know if this helps.

public void CopyGridToClipboard()
GridRangeInfoList list = new GridRangeInfoList();
list.Add(GridRangeInfo.Cells(0,0, Model.RowCount, Model.ColCount));
bool b = CutPaste.CopyTextToClipboard(list);

Best regards,

Aaron Schaefer
Replied On March 23, 2007 03:53 PM UTC

Thank You!

That worked as intended.



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

or the page will be automatically redirected to 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