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.

System.ArgumentException: Value does not fall within the expected range.

Thread ID:

Created:

Updated:

Platform:

Replies:

28167 Apr 25,2005 11:53 PM Apr 26,2005 04:41 PM Windows Forms 3
loading
Tags: GridControl
Chun Wing Man
Asked On April 25, 2005 11:53 PM

Hi, Recently I m getting execution error as show below. This error only happens to me and the same src code and executable runs OK on other''s machine. Does anyone know why ? and what needs to check ? thanks Wing ERROR MSG:---- 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.RectangleToClientRowCol(Rectangle rect, Int32& topRow, Int32& leftCol, Int32& bottomRow, Int32& rightCol, GridCellSizeKind sizeKind) at Syncfusion.Windows.Forms.Grid.GridPaint.DrawGrid(Graphics g, Boolean shouldClip, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) catched at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) in :line 0 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_VisibleRows() at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) catched at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) in :line 0 System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Windows.Forms.Grid.DrawStruct.Dispose(GridControlBase grid) at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnDrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridPaint.DrawGrid(Graphics g, Boolean shouldClip, Rectangle rectClip) at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) catched at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) in :line 0 Main Value does not fall within the expected range. The thread ''.NET SystemEvents'' (0xc84) has exited with code 0 (0x0). The program ''[3668] Main.exe'' has exited with code 0 (0x0).

Pua Eng Heng
Replied On April 26, 2005 03:19 AM

I have also encountered this error occasionally when rebinding the grid (i.e clear the grid data source and then rebind it with a new DataTable). This problem is quite random in nature and seems to happen more frequenctly in certain machine. Appreciate if Syncfusion can clarify this error. Regards Pua Eng Heng. >Hi, > >Recently I m getting execution error as show below. This error only happens to me and the same src code and executable runs OK on other''s machine. Does anyone know why ? and what needs to check ? > >thanks >Wing > >ERROR MSG:---- > >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.RectangleToClientRowCol(Rectangle rect, Int32& topRow, Int32& leftCol, Int32& bottomRow, Int32& rightCol, GridCellSizeKind sizeKind) > at Syncfusion.Windows.Forms.Grid.GridPaint.DrawGrid(Graphics g, Boolean shouldClip, Rectangle rectClip) > at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) >catched at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) in :line 0 >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_VisibleRows() > at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) >catched at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) in :line 0 >System.NullReferenceException: Object reference not set to an instance of an object. > at Syncfusion.Windows.Forms.Grid.DrawStruct.Dispose(GridControlBase grid) > at Syncfusion.Windows.Forms.Grid.GridPaint.DrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) > at Syncfusion.Windows.Forms.Grid.GridControlBase.OnDrawClientRowCol(Int32 topRow, Int32 leftCol, Int32 bottomRow, Int32 rightCol, Graphics g, Rectangle rectClip) > at Syncfusion.Windows.Forms.Grid.GridPaint.DrawGrid(Graphics g, Boolean shouldClip, Rectangle rectClip) > at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) >catched at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe) in :line 0 >Main Value does not fall within the expected range. >The thread ''.NET SystemEvents'' (0xc84) has exited with code 0 (0x0). >The program ''[3668] Main.exe'' has exited with code 0 (0x0). >

Chun Wing Man
Replied On April 26, 2005 05:26 AM

I am not using DataTable, instead i m using the unbind grid method, refresh the grid rapidily. and eventually got this error soon...

Administrator [Syncfusion]
Replied On April 26, 2005 04:41 PM

Are you using Multiple threads in your application? If so please check this KB article. http://www.syncfusion.com/Support/article.aspx?id=572 It may be due to 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. If you are not using 3.2, can you please try in this version? There has been a change in the GridRangeInfo class to avoid an exception: // From 3.2 release notes *Added a check for top < 0 || left < 0 in GridRangeInfo.InternalCells to avoid exception being thrown. Thanks, Jay N

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.

;