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.

CopyTextToClipboard method

Thread ID:

Created:

Updated:

Platform:

Replies:

58357 Mar 22,2007 12:12 PM Mar 23,2007 11:53 AM Windows Forms 2
loading
Tags: GridControl
Aaron Schaefer
Asked On March 22, 2007 12:12 PM

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();
list.Add(GridRangeInfo.Table());
bool b = CutPaste.CopyTextToClipboard(list);
}

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

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,
Haneef

Aaron Schaefer
Replied On March 23, 2007 11:53 AM

Thank You!

That worked as intended.

Aaron

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.

;