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

Grid throws internal error when I mouseover a checkbox column

I have a flat ggc that is bound to a datatable.
I have a checkbox column that is bound to a bit field in the datatable.

Whenever i mouseover the checkbox column, I get this internal error by the grid below....





An error occurred please contact the adminstrator with the following information:

Parameter is not valid.

Stack Trace:
at System.Drawing.Graphics.set_RenderingOrigin(Point value)
at Syncfusion.Windows.Forms.ScrollControl.FixRenderOrigin(Graphics g)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnPaint(PaintEventArgs e)
at Syncfusion.Windows.Forms.ScrollControl.WmPaint(Message& msg)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg)
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)



I was handling the following event below...
////need to make sure grid draws ok as when sized because of the dynamic QueryColWidth event handler
//this.gridGroupingControl2.TableControl.Model.Options.SmoothControlResize = false;

////To fill the width of the last column to clientArea width.
//this.gridGroupingControl2.TableModel.QueryColWidth += new GridRowColSizeEventHandler(gridGroupingControl2_TableModel_QueryColWidth);

////To cancel the Resizing on Last Column in a grid.
//this.gridGroupingControl2.TableControl.ResizingColumns += new GridResizingColumnsEventHandler(gridGroupingControl2_TableControl_ResizingColumns);


to fill the last column, which I have since commented out... but the grid still throws this error.

1 Reply

HA haneefm Syncfusion Team June 29, 2007 11:19 PM UTC

Hi James,

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.
Here is a sample.
LoadDataBackGroundThread

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon