Need Help: Hiding rows cause index error?

Posted by: liangwenfeng on 8 September 2017, 2:10 pm EST

  • Posted 8 September 2017, 2:10 pm EST

     Today i update my spread control from "3.0.2008.2005" to "3.0.2010.2005", some code just crush:(

    example code(i have a 5 rows, 5 columns spread table):

                fpSpread1.ActiveSheet.Rows[0].Visible = false;
                fpSpread1.ActiveSheet.Rows[1].Visible = false;
                fpSpread1.ActiveSheet.Rows[2].Visible = false;
                fpSpread1.ActiveSheet.Rows[3].Visible = false;
                fpSpread1.ActiveSheet.Rows[4].Visible = false;

                fpSpread1.ActiveSheet.SetValue(0, 0, "ok");

    while setValue() was called,  "3.0.2010.2005" throw an exception:

    System.IndexOutOfRangeException ??????????????
      Message="Invalid row index: -1 (must be between 0 and 4)"
           ?? FarPoint.Win.Spread.Cells.get_Item(Int32 row, Int32 column)
           ?? FarPoint.Win.Spread.SheetView.ah()
           ?? FarPoint.Win.Spread.SheetView.OnCellChanged(Int32 row, Int32 column, Int32 rowCount, Int32 columnCount)
           ?? FarPoint.Win.Spread.SheetView.OnDataModelChanged(Object sender, SheetDataModelEventArgs e)
           ?? FarPoint.Win.Spread.Model.SheetDataModelEventHandler.Invoke(Object sender, SheetDataModelEventArgs e)
           ?? FarPoint.Win.Spread.Model.BaseSheetDataModel.OnChanged(SheetDataModelEventArgs e)
           ?? FarPoint.Win.Spread.Model.BaseSheetDataModel.FireChanged(Int32 row, Int32 column)
           ?? FarPoint.Win.Spread.Model.DefaultSheetDataModel.SetValue(Int32 row, Int32 column, Object value)
           ?? FarPoint.Win.Spread.SheetView.SetValue(Int32 row, Int32 column, Object value, Boolean validate)
           ?? FarPoint.Win.Spread.SheetView.SetValue(Int32 row, Int32 column, Object value)
           ?? SchemaCompare.Form1.Form1_Load(Object sender, EventArgs e) ?? C:\Documents and Settings\164\My Documents\Visual Studio 2005\Projects\SchemaCompare\SchemaCompare\Form1.cs:? 40
           ?? System.Windows.Forms.Form.OnLoad(EventArgs e)
           ?? System.Windows.Forms.Form.OnCreateControl()
           ?? System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
           ?? System.Windows.Forms.Control.CreateControl()
           ?? System.Windows.Forms.Control.WmShowWindow(Message& m)
           ?? System.Windows.Forms.Control.WndProc(Message& m)
           ?? System.Windows.Forms.ScrollableControl.WndProc(Message& m)
           ?? System.Windows.Forms.ContainerControl.WndProc(Message& m)
           ?? System.Windows.Forms.Form.WmShowWindow(Message& m)
           ?? System.Windows.Forms.Form.WndProc(Message& m)
           ?? System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           ?? System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           ?? System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           ?? System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
           ?? System.Windows.Forms.Control.SetVisibleCore(Boolean value)
           ?? System.Windows.Forms.Form.SetVisibleCore(Boolean value)
           ?? System.Windows.Forms.Control.set_Visible(Boolean value)
           ?? System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           ?? System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           ?? System.Windows.Forms.Application.Run(Form mainForm)
           ?? SchemaCompare.Program.Main() ?? C:\Documents and Settings\164\My Documents\Visual Studio 2005\Projects\SchemaCompare\SchemaCompare\Program.cs:? 17
           ?? System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           ?? System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           ?? Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           ?? System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           ?? System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           ?? System.Threading.ThreadHelper.ThreadStart()

    but "3.0.2008.2005" works ok, this seems that it's a bug of version "3.0.2010.2005"?

    what can i do? can anyone help me ?

  • Replied 8 September 2017, 2:10 pm EST


    We have tested this issue and its a bug in version 3.0. You can try upgrading Spread to version to 4.0 as it works fine there.


  • Replied 8 September 2017, 2:10 pm EST


    To add on to what i have mentioned above, it seems that you are using the <SPAN>Japanese version of Spread and there is no version 4 for the Japanese Spread.</SPAN>

    However this issue in Japanese Spread has already been reported as bug #27876. And you can have a look at the workaorund to this bug in this link .

    Hope this will help. Thanks.

  • Replied 8 September 2017, 2:10 pm EST

    Thank you very much.

    maybe i should back to 3.0.2008.2005<img src="/emoticons/emotion-6.gif" alt="Sad" />

Need extra support?

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

Learn More

Forum Channels