GridDeskTop insertrow() and merged cells

Hi,


I am using Aspose.Cells for GridDesktop 8.7.0.0,

The following does not work as expected:

open a new sheet;
in column A, put value 1 in row 1, 2 in row 2, 3 in row 3;
In row 2, merge cells A2 and B2
Select row 2, and perform an insertcolumn() with following code
Aspose.Cells.GridDesktop.Worksheet ws;
CellLocation cl;
ws = gridDesktop1.Worksheets[gridDesktop1.GetActiveWorksheet().Index];
cl = ws.GetFocusedCellLocation();
ws.InsertRow(cl.Row);

The new row (index=2) has inherited the merged cells;
The row previously selected (now index=3) has no merged cells anymore.

Thanks for your help

Daniel

Hi,

Thanks for providing us details and sample code.

After an initial test, I observed the issue as you mentioned. I found an issue with Worksheet.InsertRow() and merged cells, Aspose.Cells.GridDesktop is not following the same behavior as per MS Excel. I tried the following steps and sample code in GridDesktop:

  1. Open a new sheet;
  2. In column A, put value 1 in row 1, 2 in row 2, 3 in row 3;
  3. In row 2, merge cells A2 and B2
  4. Select row 2, and use the following sample code in some .NET button’s click:

e.g.
Sample code:

Aspose.Cells.GridDesktop.Worksheet ws;

CellLocation cl;

ws = this._grid.Worksheets[_grid.GetActiveWorksheet().Index];

cl = ws.GetFocusedCellLocation();

ws.InsertRow(cl.Row);

The new blank row (index=2) has inherited the merged cells where as it should not have merged cell. The row previously selected (now index=3) has no merged cells anymore where it should has merged cell. I have logged a ticket with an id “CELLSNET-44235” for your issue. We will look into your issue soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,


Please try our latest version/fix: Aspose.Cells.GridDesktop v8.7.1.3 (attached)
We have fixed your issue “CELLSNET-44235” as I tested and confirmed.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-44235) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

GridDesktop 9.0.9.0


Hello,

I follow your steps and I have exactly the same bug
It seems the problem still exists.
Also when we copy/paste a merged cell, the destination cell is not a merged one.


Hi RICHARD Yannick,

I have tested your scenario/ case following the steps (mentioned in the post) and sample code. I am afraid, I am unable to reproduce the issue, it works fine. Could you provide us a sample project to reproduce the issue on our end, we will check it soon.

AsterYRI:
Also when we copy/paste a merged cell, the destination cell is not a merged one.

I have seen this issue after an initial test though, it would be better if you could post this issue separately by creating a new thread. This way, it would be much easier to manage issues for tracking purpose.

Thank you.

Hi RICHARD Yannick,


Thanks for the sample project.

I have followed the following steps using your sample project but I am afraid, I still could not find the issue:

1) Run your project to open the “MDIParent1” form.
2) In column A, put value 1 in row 1 (A1 cell), 2 in row 2 (A2 cell), 3 in row 3 (A3);
3) In row 2, merge cells A2:B2 to become A2.
3) Select row 2, click “Insert Row” toolbar button to insert a new row.
I confirmed the new blank row (index=2) has not inherited the merged cells, it should not have merged cell. The row previously selected (now index=3) has retained merged cells. In short, it Ok and same as MS Excel.

If you still have the issue, could you give more more details and steps involved to reproduce the issue, we will check it soon.

Thank you.

Hello,


It’s OK for me, i misunderstood the steps.

Now it works fine.

Hi,


Good to know that you understand it now. Feel free to write us back if you have further questions or comments, we will be happy to assist you soon.

Thank you.