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.
Unfortunately, activation email could not send to your email. Please try again.

GridDataBoundGrid : Exception

Thread ID:

Created:

Updated:

Platform:

Replies:

50353 Oct 10,2006 02:43 PM Oct 11,2006 01:43 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 10, 2006 02:43 PM

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

Administrator [Syncfusion]
Replied On October 11, 2006 01:43 AM

Hi Vanitha,

The error which you have mentioned, is an indication of threading issues.

Are there multiple threads involved in your appilcation? If so, please check the Knowledge Base(KB) article link below.

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=78

Intermittant errors can be indications of threading issues. Any calls into the grid must be done on the thread that creates it, and you can use grid.InvokeRequired to check for this.

http://www.syncfusion.com/support/user/uploads/loaddatainbackgroundthread632254810888767829.zip

Regards,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;