ArgumentOutOfRange - ShowActiveCell

Posted by: silkkeng-fp on 8 September 2017, 2:29 pm EST

  • Posted 8 September 2017, 2:29 pm EST

    Hi,

    We are receiving an error on when Spread call ShowActiveCell:

    Invalid row index specified (must be between 0 and 0).
    Parameter name: row
    Actual value was -1.

    See call stack below.

       at FarPoint.Win.Spread.SheetView.IsRowExpanded(Int32 row)
       at FarPoint.Win.Spread.SpreadView.ShowCell(Int32 rowViewportIndex, Int32 columnViewportIndex, Int32 row, Int32 column, VerticalPosition verticalPosition, HorizontalPosition horizontalPosition)
       at FarPoint.Win.Spread.SpreadView.ShowActiveCell(VerticalPosition verticalPosition, HorizontalPosition horizontalPosition)
       at FarPoint.Win.Spread.FpSpread.ShowActiveCell(VerticalPosition verticalPosition, HorizontalPosition horizontalPosition)
     

    We hide and lock the first row, then

    Me.ActiveControl = SpreadSection
    Me.SpreadSection_Sheet1.SetActiveCell(0, 0)
    SpreadSection.ShowActiveCell(VerticalPosition.Nearest, HorizontalPosition.Nearest)

    The horizontal scroll bar was visible.

    However, we have no clue what else in the spread settings will cause this.

    I noticed that if I unhide the row, it works fine.

    Can you please shed some light?

    Kind Regards,
    David

     

  • Replied 8 September 2017, 2:29 pm EST

    Hello,

    I am not able to reproduce this issue at my end, I used the following code to set and show the active cell while the first row is hidden.

            FpSpread1.ActiveSheet.SetActiveCell(0, 0)
            FpSpread1.ShowActiveCell(FarPoint.Win.Spread.VerticalPosition.Nearest, FarPoint.Win.Spread.HorizontalPosition.Nearest)

    It doesn't raise the error message.I am using spread 5 latest build. Could you please provide me a sample application so that I can reproduce this issue at my end.

     

    Thanks,

     

     

Need extra support?

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

Learn More

Forum Channels