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 Selected Rows to Clipboard

Thread ID:

Created:

Updated:

Platform:

Replies:

20353 Oct 14,2004 01:39 PM Oct 15,2004 03:01 PM Windows Forms 2
loading
Tags: GridControl
Jeff Lancaster
Asked On October 14, 2004 01:39 PM

I am using the following code to copy the data from the selected range of cells into the clipboard: Dim range As GridRangeInfo = m_Grid.Model.SelectedRanges(0) Dim rangeList As GridRangeInfoList = New GridRangeInfoList rangeList.Add(range) m_Grid.Model.CutPaste.CopyTextToClipboard(rangeList) This works fine if my selected range only contains partial rows (ie: range.info ="R2C3:R3C4"). However, if I select my range by rows such that range.info ends up containing something like "R4:R5" the copy doesn''t seem to work. How can I modify this to recognize both range selections and entire row selections?

Administrator [Syncfusion]
Replied On October 14, 2004 02:15 PM

Before adding your range to the rangelist, use range.ExpandRange to change an arbitrary range into a cell range. range = range.ExpandRange(1, 1, grid.Model.RowCount, grid.Model.ColCount)

Jeff Lancaster
Replied On October 15, 2004 03:01 PM

That works great! Thanks, Clay.

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.

;