The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator Syncfusion Team 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));
PZPeter ZaborskiNovember 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
ADAdministrator Syncfusion Team 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.