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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

BUG: GridModel.CopyTextToBuffer

Thread ID:





8601 Nov 13,2003 05:10 PM UTC Nov 14,2003 04:05 PM UTC WinForms 3
Tags: GridControl
Peter Zaborski
Asked On November 13, 2003 05:10 PM UTC

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 -Peter PS - An even worse problem occurs when you set the selection RangeInfo to type Table.

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

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 02:44 PM UTC

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 04:05 PM UTC

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.


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

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

Live Chat Icon For mobile
Live Chat Icon