Customer Query :
In our application, we are using GridDataBoundGrid control (Syncfusion version - 3.3, .Net framework - 1.1). When I try to load the datagrid with datatable, sometimes it is throwing the following exceptions.
System.ArgumentException: Value does not fall within the expected range.
at Syncfusion.Windows.Forms.Grid.GridRangeInfo..ctor(Int32 top, Int32 left, Int32 bottom, Int32 right)
at Syncfusion.Windows.Forms.Grid.GridRangeInfo.InternalCells(Int32 top,Int32 left, Int32 bottom, Int32 right)
at Syncfusion.Windows.Forms.Grid.GridViewLayout.Initialize()
at Syncfusion.Windows.Forms.Grid.GridViewLayout.DemandInitialize()
at Syncfusion.Windows.Forms.Grid.GridViewLayout.get_LastVisibleRow()
at Syncfusion.Windows.Forms.Grid.GridControlBase.EndUpdateModel(Boolean update, Boolean fromModel)
at Syncfusion.Windows.Forms.Grid.GridControlBase.EndUpdate(Boolean update)
at Syncfusion.Windows.Forms.ScrollControl.EndUpdate() in C:\Program Files\Syncfusion\Essential Studio\3.3.0.0 \Base\Shared.Base\Src\Scrolling\ScrollControl.cs:line 4348
at Syncfusion.Windows.Forms.ScrollControl.CancelUpdate() in C:\Program Files\Syncfusion\Essential Studio\3.3.0.0 \Base\Shared.Base\Src\Scrolling\ScrollControl.cs:line 4358
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) in C:\Program Files\Syncfusion\Essential Studio\3.3.0.0 \Base\Shared.Base\Src\Scrolling\ScrollControl.cs:line 2890
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-----------------------------------------------------------------------
Stack Trace: at Syncfusion.Windows.Forms.Grid.GridRangeInfo..ctor(Int32 top, Int32 left, Int32 bottom, Int32 right)
at Syncfusion.Windows.Forms.Grid.GridRangeInfo.InternalCells(Int32 top,Int32 left, Int32 bottom, Int32 right)
at Syncfusion.Windows.Forms.Grid.GridViewLayout.Initialize()
at Syncfusion.Windows.Forms.Grid.GridViewLayout.DemandInitialize()
at Syncfusion.Windows.Forms.Grid.GridViewLayout.get_LastVisibleRow()
at Syncfusion.Windows.Forms.Grid.GridControlBase.EndUpdateModel(Boolean update, Boolean fromModel)
at Syncfusion.Windows.Forms.Grid.GridControlBase.EndUpdate(Booleanupdate)
at Syncfusion.Windows.Forms.ScrollControl.EndUpdate() in C:\Program Files\Syncfusion\Essential Studio\3.3.0.0 \Base\Shared.Base\Src\Scrolling\ScrollControl.cs:line 4348
at Syncfusion.Windows.Forms.ScrollControl.CancelUpdate() in C:\Program Files\Syncfusion\Essential Studio\3.3.0.0 \Base\Shared.Base\Src\Scrolling\ScrollControl.cs:line 4358
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) in C:\Program Files\Syncfusion\Essential Studio\3.3.0.0 \Base\Shared.Base\Src\Scrolling\ScrollControl.cs:line 2890
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-------------------------------------------------
System.InvalidProgramException: Grid is in updating mode
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgspe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-----------------------------------------------------------------------
Stack Trace: at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Could you please let us know the cause of this exception and how to avoid this.
Thanks and Regards,
Vanitha