Exception in RemoveColumns Method

Posted by: stefanleitl on 8 September 2017, 2:51 pm EST

  • Posted 8 September 2017, 2:51 pm EST

    Hello,

     I merge the cells of one row over 3 columns. If i would delete the middle column an exception is thrown. I dont know why because the Index seems to be ok.

    ---------------------------------------------------
    |                                                  |
    ---------------------------------------------------
    |                |                  |              |
    ---------------------------------------------------
    |                |                  |              |

    ---------------------------------------------------

    Have somebody an idea?

    Here's the Exception and the Call-Stack.

     


    IndexOutOfRangeException

    Invalid column index:3

      bei FarPoint.Win.Spread.Columns.get_Item(Int32 column)

       bei FarPoint.Win.Spread.SpreadView.b(SheetView A_0, ar A_1, Int32 A_2, Int32 A_3, Int32 A_4, Int32 A_5, ISheetSpanModel A_6, Int32 A_7, Int32 A_8, Boolean A_9, ay[,]& A_10, ef[]& A_11, cc[]& A_12, Int32 A_13, Font A_14)

       bei FarPoint.Win.Spread.SpreadView.a(SheetView A_0, ar A_1, Int32 A_2, Int32 A_3, Int32 A_4, Int32 A_5, ISheetSpanModel A_6, Int32 A_7, Int32 A_8, Boolean A_9, ay[,]& A_10, ef[]& A_11, cc[]& A_12, Int32 A_13, Font A_14)

       bei FarPoint.Win.Spread.SpreadView.ae(Int32 A_0, Int32 A_1)

       bei FarPoint.Win.Spread.SpreadView.ad(Int32 A_0, Int32 A_1)

       bei FarPoint.Win.Spread.SpreadView.a(Int32 A_0, Int32 A_1, Int32 A_2, Int32 A_3, Boolean A_4, Boolean A_5)

       bei FarPoint.Win.Spread.SpreadView.a(Object A_0, SheetSelectionModelEventArgs A_1)

       bei FarPoint.Win.Spread.Model.SheetSelectionModelEventHandler.Invoke(Object sender, SheetSelectionModelEventArgs e)

       bei FarPoint.Win.Spread.Model.BaseSheetSelectionModel.OnChanged(SheetSelectionModelEventArgs e)

       bei FarPoint.Win.Spread.Model.BaseSheetSelectionModel.FireChanged(Int32 row, Int32 column, Int32 rowCount, Int32 columnCount)

       bei FarPoint.Win.Spread.Model.DefaultSheetSelectionModel.FarPoint.Win.Spread.Model.INotifySelectionChanged.ClearSelection()

       bei FarPoint.Win.Spread.Model.DefaultSheetSelectionModel.ClearSelection()

       bei FarPoint.Win.Spread.SheetView.SetActiveCell(Int32 row, Int32 column, Boolean clearSelection)

       bei FarPoint.Win.Spread.SheetView.SetActiveCell(Int32 row, Int32 column)

       bei FarPoint.Win.Spread.SpreadView.b(Object A_0, SheetSpanModelEventArgs A_1)

       bei FarPoint.Win.Spread.Model.SheetSpanModelEventHandler.Invoke(Object sender, SheetSpanModelEventArgs e)

       bei FarPoint.Win.Spread.Model.BaseSheetSpanModel.OnChanged(SheetSpanModelEventArgs e)

       bei FarPoint.Win.Spread.Model.BaseSheetSpanModel.FireChanged(Int32 row, Int32 column, Int32 rowCount, Int32 columnCount, SheetSpanModelEventType type)

       bei FarPoint.Win.Spread.Model.DefaultSheetSpanModel.FarPoint.Win.Spread.Model.IRangeSupport.RemoveColumns(Int32 column, Int32 count)

       bei FarPoint.Win.Spread.SheetView.OnRemoveColumns(Int32 column, Int32 count)

       bei FarPoint.Win.Spread.SheetView.OnDataModelChanged(Object sender, SheetDataModelEventArgs e)

       bei FarPoint.Win.Spread.Model.SheetDataModelEventHandler.Invoke(Object sender, SheetDataModelEventArgs e)

       bei FarPoint.Win.Spread.Model.BaseSheetDataModel.OnChanged(SheetDataModelEventArgs e)

       bei FarPoint.Win.Spread.Model.DefaultSheetDataModel.OnChanged(SheetDataModelEventArgs e)

       bei FarPoint.Win.Spread.Model.BaseSheetDataModel.FireChanged(Int32 row, Int32 column, Int32 rowCount, Int32 columnCount, SheetDataModelEventType type)

       bei FarPoint.Win.Spread.Model.DefaultSheetDataModel.FireChanged(Int32 row, Int32 column, Int32 rowCount, Int32 columnCount, SheetDataModelEventType type)

       bei FarPoint.Win.Spread.Model.DefaultSheetDataModel.RemoveColumns(Int32 column, Int32 count)

       bei FarPoint.Win.Spread.SheetView.RemoveColumns(Int32 column, Int32 count)

      

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    ok and when will the release be available?

  • Replied 8 September 2017, 2:51 pm EST

    Can you reproduce this in a simple sample app that demonstrates the issue? If so please attach it here via the options menu, you would need to delete the bin and debug folders, and zip it.
  • Replied 8 September 2017, 2:51 pm EST

    Hello,

     I could reproduce it in a little sample.

    I think the issue is the property "AllowCellOverflow".

     

    Thanks


    2012/01/Appl.zip
  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    I was not able to replicate the issue with your sample. Once, I tried to delete the column by directly clicking on the button and later I typed something in Spread cells so that the content could overflow and then clicked on the button to delete a column, in both cases the column was deleted without any exception. Could you please tell me what steps should I exactly follow to replicate the issue at my end.

    Thanks,

    Manpreet Kaur.

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    i select the second column. Then i'm clicking the button.

    This are the only things i'll do and always an exception is thrown.

    Thanks

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    Thank you for the information, I was able to replicate the issue at my end. It seems to be a bug, I have reported it to the development team. The bug number for the same is #99924049. It would be fixed in the next maintenance release.

    Thanks,

    Manpreet Kaur.

  • Replied 8 September 2017, 2:51 pm EST

    End of Febuary Time Frame
  • Replied 8 September 2017, 2:51 pm EST

    Hi,

    The bug will be fixed in the next release of v6.  We are no longer making maintenance releases for v5, so you would need to upgrade to v6 to get the fix.

    You can work around the issue by turning off cell overflow before removing the column:

                fpSpread1_Sheet1.FpSpread.AllowCellOverflow = false;
                fpSpread1_Sheet1.RemoveColumns(fpSpread1_Sheet1.Models.Selection.AnchorColumn, 1);
                fpSpread1_Sheet1.FpSpread.AllowCellOverflow = true;
     

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    Could you please let me know, if the workaround suggested for the issue, is working fine at your end. Do you have any queries further.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 2:51 pm EST

    Hello,

    I would like you to know that bug number #99924049 has been fixed in the next service pack of Spread which is expected to be released in early December this year. You can download the same from the following link as soon as it is released:

                                   http://www.gcpowertools.com/DownloadLatestVersion

    Hope it will help you.

    Thanks,

    Manpreet Kaur

Need extra support?

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

Learn More

Forum Channels