SheetView.MoveColumn error

Posted by: visionsteve on 8 September 2017, 2:50 pm EST

  • Posted 8 September 2017, 2:50 pm EST

    We have a product using FarPoint Spread version 4 which I am test converting to Spread version 6 (trial for now).  It has a feature where the users can move columns left or right which is throwing an "Argument Invalid" exception suddenly.  The code is straight forward and works flawlessly in v4:

    <span class="Apple-tab-span" style="white-space:pre;"> </span>fsInput.MoveColumn( currIndex, nextIndex, true ); 

    where fsInput is a Farpoint.Win.Spread.SheetView.  There are 14 columns, and currIndex = 10, nextIndex = 9. 

    This is the exception details:

    System.ArgumentException was unhandled by user code

      Message=Parameter is not valid.



           at System.Drawing.Region.MakeEmpty()

           at FarPoint.Win.Spread.SpreadView.k(SheetView A_0)

           at FarPoint.Win.Spread.SpreadView.g(Boolean A_0)

           at FarPoint.Win.Spread.SpreadView.f3()

           at FarPoint.Win.Spread.SheetView.c()

           at FarPoint.Win.Spread.SheetView.OnSheetRangeGroupModelChanged(Object sender, RangeGroupModelEventArgs e)

           at FarPoint.Win.Spread.DefaultRangeGroupModel.a(RangeGroupModelEventArgs A_0)

           at FarPoint.Win.Spread.DefaultRangeGroupModel.Move(Int32 fromIndex, Int32 toIndex, Int32 moveCount, Boolean isRowGroup)

           at FarPoint.Win.Spread.SheetView.b(Int32 A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4, Int32 A_5, Boolean A_6, Boolean A_7)

           at FarPoint.Win.Spread.SheetView.b(Int32 A_0, Int32 A_1, Boolean A_2, Boolean A_3, Boolean A_4)

           at FarPoint.Win.Spread.SheetView.MoveColumn(Int32 fromIndex, Int32 toIndex, Boolean moveContent)

           at visionsoftwaresolutions.fiscal.bus_financials.ui.FinancialSpreadUI.moveStatements(Direction direction) in C:\DEV\Fiscal\bus_financials\ui\FinancialSpreadUI.cs:line 2619

           at visionsoftwaresolutions.fiscal.bus_financials.ui.FinancialSpreadUI.tlsbtnMoveLeft_Click(Object sender, EventArgs e) in C:\DEV\Fiscal\bus_financials\ui\FinancialSpreadUI.cs:line 2632

           at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

           at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)

           at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

           at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

           at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

           at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

           at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

           at System.Windows.Forms.Control.WndProc(Message& m)

           at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

           at System.Windows.Forms.ToolStrip.WndProc(Message& m)

           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

           at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




  • Replied 8 September 2017, 2:50 pm EST


    I was not able to replicate the issue at my end, I was able to use the MoveColumn method without any exceptions. I would request you to provide me a sample depicting the issue that you are facing, so that I can debug it further and help you to resolve it.


    Manpreet Kaur.

Need extra support?

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

Learn More

Forum Channels