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.

copy selection

Thread ID:

Created:

Updated:

Platform:

Replies:

35708 Oct 6,2005 03:31 PM Oct 7,2005 11:06 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 6, 2005 03:31 PM

I would like to copy a user''s selected range (results from the QuoteGrid.Selections.GetSelectedRanges, QuoteGrid.Selections.GetSelectedCols, or QuoteGrid.Selections.GetSelectedRows function) onto the windows clipboard for pasting elsewhere. How can I do this? Thx

Administrator [Syncfusion]
Replied On October 6, 2005 03:47 PM

I also need to copy the grid''s column headers, whether they''re vertical or horizontal. thx >I would like to copy a user''s selected range (results from the QuoteGrid.Selections.GetSelectedRanges, QuoteGrid.Selections.GetSelectedCols, or QuoteGrid.Selections.GetSelectedRows function) >onto the windows clipboard for pasting elsewhere. > >How can I do this? > >Thx >

Administrator [Syncfusion]
Replied On October 6, 2005 05:43 PM

To copy the contents of selected cells to the clipboard, you can call: this.grid.Model.CutPaste.Copy(); To copy the header row, you can use code like: this.grid.Selections.SelectRange(GridRangeInfo.Row(0), true); this.grid.Model.CutPaste.Copy();

Administrator [Syncfusion]
Replied On October 7, 2005 09:59 AM

Will this allow me to copy both the header and the selected range? Will this also copy the grid layout? The user needs to see the grid exactly as it looks on the grid (the lines on the grid as well). Can we do this?? When I ran your code, I only copied the data in the grid, not the headings and not the cells the data resides in. thx.

Administrator [Syncfusion]
Replied On October 7, 2005 11:06 AM

It will allow you to copy the text of both the header and the other selections. But it will not copy anything else (no gridlines, etc.). If you want to snap a bitmap of a range and try to use the bitmap somewhere, you can look at this thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=34417

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.

;