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.

BUG: GridModel.CopyTextToBuffer

Thread ID:

Created:

Updated:

Platform:

Replies:

8601 Nov 13,2003 12:10 PM Nov 14,2003 11:05 AM Windows Forms 3
loading
Tags: GridControl
Peter Zaborski
Asked On November 13, 2003 12:10 PM

Not sure if this is reported yet but I think there is a bug in this function. Do the following (assuming you have a data bound grid with a populated DataTable as its DataSource): 1. Create a RangeInfoList containing one RangeInfo whose type is Cols. Let's say it's called "selections". 2. Call grid.Model.CutPaste.CopyRange(selections); 3. Note that the clipboard is empty. 4. Repeat the first step but use a Cells RangeInfo (for the same range, ie. a bunch of columns) and note that it works as expected. I think the bug is in the CopyTextToBuffer function where it tries to get the rowRanges and colRanges. The filter should probably include Cols for rangeList.GetRowRanges and vice versa. FWIW, my version of the grid is 1.6.1.0. -Peter PS - An even worse problem occurs when you set the selection RangeInfo to type Table.

Administrator [Syncfusion]
Replied On November 13, 2003 06:16 PM

Try calling ExpandRange before you pass it to CopyRange to see if this avoids this problem. grid.Model.CutPaste.CopyRange(selections.ExpandRange(1,1,this.gridDataBoundGrid1.Model.RowCount, this.gridDataBoundGrid1.Model.ColCount));

Peter Zaborski
Replied On November 14, 2003 09:44 AM

Hi Clay, I have found a workaround for the problem I described, thanks. Are you saying that this is not a bug? I've attached a very simple project to illustrate what I was describing. Please let me know if the behavior I am seeing is expected (ie. Cols, Rows or Table ranges are not valid to pass to CutPaste.CopyRange). -Peter

Administrator [Syncfusion]
Replied On November 14, 2003 11:05 AM

Thank you for the sample, Peter. For now, we are treating this as a usage issue, requiring the call to ExpandRange before calling CopyRange if you are using something other than a cell range. Stefan will look into handling this, but there are some usages of CopyRange internal to the grid where he wants to allow ranges other than Cell ranges. So, until he can work through those particular situations, you'll need to use ExpandRange. We will document this in the next release.

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.

;