I am getting Invalid Row index error

Posted by: mathew-fp on 8 September 2017, 11:21 am EST

  • Posted 8 September 2017, 11:21 am EST

    Hi…



    I’m getting an unhadled exception error that i cannot trace down. 



    the error is…



    System.IndexOutOfRangeException: Invalid row index: 1 (must be between 0 and -1)

    at FarPoint.Win.Spread.Cells.get_Item(Int32 row, Int32 column)

    at FarPoint.Win.Spread.SpreadView.i(Object A_0, EventArgs A_1)

    at System.Windows.Forms.Timer.OnTick(EventArgs e)

    at System.Windows.Forms.Timer.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)



    n short, the error in being generated by the tooltip (or texttip) timer

    when tooltips are enabled for the spread control and the sheets row count is modified.

     For example, if you have a sheet with a row count of 100 and then change the row

    count to 10, if your mouse is hovering over any row between 11 and 100 the error

    will be generated when the toolip or texttip timer fires…



    If i make TextTipPolicy.off its working fine… But i want TextTipPolicy.Floating.  so please let me know how to resolve this problem…





    I am using mousemove code here shown below…

    FarPoint.Win.Spread.Model.CellRange cs  = this.fpsMatrix.GetCellFromPixel(0,0,e.X, e.Y);

    if ((cs.Column < this.fpsMatrixSheet.ColumnCount) &&

        (cs.Row < this.fpsMatrixSheet.RowCount))

    {



        if ((cs.Column != -1) && (cs.Row != -1))

        {

             this.fpsMatrix.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Floating;

        }

        else

        {                    

          

            this.fpsMatrix.TextTipPolicy = FarPoint.Win.Spread.TextTipPolicy.Off;

                        

        }

    }



    I can not make TextTipPolicy off… i want that to display test tip…







    Please help me on this…



    Thanx & Regards

    Mathew…

  • Posted 8 September 2017, 11:21 am EST

    Matthew,



    This was a bug in the Spread for Windows Forms product that should have been fixed in the latest maintenance release. Make sure you have version 1.0.6.0 of Spread for Windows Forms.

  • Posted 8 September 2017, 11:21 am EST

    Hi Scott…



      Thanx for your reply.

    I am using  1.0.2.2 version spread.  Still i need to take the latest version of spread but it may take time i feel. But since my requirement is very urgent can you please help me on code how can i resolve the  problem (Invalid row index). Can you please give me the C# code by which i can over come from this problem…

    Later i will upgrade the version fater discussed with the management.



    Thanx & Regards

    Mathew…



  • Posted 8 September 2017, 11:21 am EST

    Matthew,



    I do not know of any way to stop the Spread timer from stoping and causing the exception to be thrown other than upgrading to the latest maintenance release.

  • Posted 20 December 2018, 3:18 am EST

    Invalid cell range — As a Error message

    0:038> !pe

    Exception object: 00000212bbdd2ff8

    Exception type: System.ApplicationException

    Message: Invalid cell range

    InnerException: System.ArgumentException, Use !PrintException 00000212bbdd2de0 to see more.

    StackTrace (generated):

    SP IP Function

    000000C8AB80CCC0 00007FFAE1B9355D UNKNOWN!Cerner.ApplicationFramework.ConversionSupport.Gui.Spread.SpreadExtensions.GetSingleCurrentCell(FarPoint.Win.Spread.FpSpread)+0x11d

    000000C8AB80EFC0 00007FFAE1B91EEA UNKNOWN!Cerner.PCSOrderList.OrderList.UpdateOrder(Cerner.pcsOrders.IPCSOrder)+0x46a

    000000C8AB80F020 00007FFAE1BC89FC DeptOrderEntry!Cerner.DeptOrderEntry.COrderProcessing+<>c__DisplayClass137_0.<Modify_ActivateFutureOrder_End>b__0()+0xdc

    000000C8AB80F070 00007FFB3B773423 mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+0x163

    000000C8AB80F140 00007FFB3B7732B4 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+0x14

    000000C8AB80F170 00007FFB3B773282 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x52

    000000C8AB80F1C0 00007FFB3B76CA42 mscorlib_ni!System.Threading.ThreadHelper.ThreadStart()+0x52

    I am getting this error when calling below code

                sshOrderList.GetSingleCurrentCell().CellType = new FarPoint.Win.Spread.CellType.EditBaseCellType();// (FarPoint.Win.Spread.CellType.BaseCellType)Cerner.PCSOrderList.modPrefs.SS_CELL_TYPE_EDIT;
    

    Please suggest if any .

Need extra support?

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

Learn More

Forum Channels