Home Forums WinForms controls Xceed Grid for WinForms System.InvalidOperationException in grid Reply To: System.InvalidOperationException in grid

User (Old forums)
Member
Post count: 23064

Sandip,

Was there ever an answer to your InvalidOperationException?  I’m seeing the same error although I do get a little more:

eError: 9/15/2008 12:50:18 PM    Unhandled exception occured:   

The paint index must be equal to -1 when row is not initialized.
Parameter name: paintIndex
Actual value was 1., Xceed.Grid
   at Xceed.Grid.PaintManager.SetFirstVisibleBodyRow(Row row, Int32 paintIndex)
   at Xceed.Grid.PaintManager.SynchronizeWithScrollBars()
   at Xceed.Grid.PaintManager.CalculateGridRectangleAdjustedToScrollBar(Graphics graphics, Rectangle& gridRectangle)
   at Xceed.Grid.PaintManager.Update()
   at Xceed.Grid.PaintManager.GetGridClientRectangle()
   at Xceed.Grid.PaintManager.GetVisualGridElementAtPoint(Int32 x, Int32 y, Boolean excludeFixedColumnSplitter)
   at Xceed.Grid.GridControl.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Control.WmMouseEnter(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Xceed.Grid.GridControl.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)

System.InvalidOperationException: An attempt was made to synchronize with the scroll bars. For an unknown reason, it was impossible to synchronize with the scroll bars.

Xceed.Grid

   at Xceed.Grid.PaintManager.SynchronizeWithScrollBars()
   at Xceed.Grid.PaintManager.CalculateGridRectangleAdjustedToScrollBar(Graphics graphics, Rectangle& gridRectangle)
   at Xceed.Grid.PaintManager.Update()
   at Xceed.Grid.PaintManager.GetGridClientRectangle()
   at Xceed.Grid.PaintManager.GetVisualGridElementAtPoint(Int32 x, Int32 y, Boolean excludeFixedColumnSplitter)
   at Xceed.Grid.GridControl.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Control.WmMouseEnter(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Xceed.Grid.GridControl.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)
             STACK:    at Xceed.Grid.PaintManager.SynchronizeWithScrollBars()
   at Xceed.Grid.PaintManager.CalculateGridRectangleAdjustedToScrollBar(Graphics graphics, Rectangle& gridRectangle)
   at Xceed.Grid.PaintManager.Update()
   at Xceed.Grid.PaintManager.GetGridClientRectangle()
   at Xceed.Grid.PaintManager.GetVisualGridElementAtPoint(Int32 x, Int32 y, Boolean excludeFixedColumnSplitter)
   at Xceed.Grid.GridControl.OnMouseEnter(EventArgs e)
   at System.Windows.Forms.Control.WmMouseEnter(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Xceed.Grid.GridControl.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)

Imported from legacy forums. Posted by Justin (had 425 views)