AddSpanCell has conflict with CopyRange

Posted by: sid on 8 September 2017, 2:52 pm EST

  • Posted 8 September 2017, 2:52 pm EST

    I have a requirement  in farpoint spread control like below:

    in the first row, there are merge cell named: bbb;

    first I should copy this merge cell to next and merge those tow cell in to one cell(still named like: bbb);

    second, I want to copy this first row to below at row 8;

     the first operation is implemented in button (Copy bbb and Merge to one cell) like below:

    this.fpSpread1.Sheets[0].CopyRange(0, 1, 0, 5, 1, 4, false);

    this.fpSpread1.Sheets[0].AddSpanCell(0, 1, 1, 8);

    the  second operation is implemented in button(Copy first row to below) like below:

    this.fpSpread1.Sheets[0].CopyRange(0, 0, 8, 0, 6, 200, false);

    the issue is that the CopyRange function has conflicts with this merge cells.

    Exception popup and say that: This operation will cause overlapping spans.

    I had attached my simple solution in Attachments, Can you help me have a look with this conflict and find one walkaround with this requirement.


    2012/02/WindowsFormsApplication3.zip
  • Replied 8 September 2017, 2:52 pm EST

    I tested your project with the 5.0.3518.2008 version references you had and I reproduced your issue but I changed your references to the last maintenance release of version 5 5.0.3522.2008 and could not reproduce it. so it would appear there was a fix between those versions. You can download the last maintenance release at ftp://ftp.fpoint.com/SpreadWinForms5/ that directory contains all the releases of version 5 for winforms both for framework 2.0 and 3.5, the versions you want are 5.03522.2008 and 5.0.2022.2008.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels