We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Exception while populating the grid

Hi,

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(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)

-------------------------------------------------

System.InvalidProgramException: Grid is in updating mode
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)

-----------------------------------------------------------------------
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

1 Reply

AD Administrator Syncfusion Team October 11, 2006 11:29 AM UTC

Hi Vanitha,

Please refer the below forum thread.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=50353

Thanks,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon