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

GridGroupingControl - Error while resizing

Dear Syncfusion,

We are using V 3.2.1.0 GridGroupingControl.

Our application will resize some screens from size height=0, width=0. We have a GGC with Dock = Fill in one such screen. And when screen is of size (0, 0), we are getting the below error.


System.ArgumentException: Invalid parameter used.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.OptimizeLoadTime()
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.f_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at UBS.Cadre.AppHost.HostForm.OnLoad(EventArgs e)
at UBS.Cadre.Workspace.Outlook.OutlookHostForm.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
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)

To fix this, we are setting Dock = None when GGC size is (0, 0) and else Fill. This is fixing the error but we see flickering effect.

So, we are wondering, if there is any fix so that we can keep GGC.Dock = Fill always, even when GGC size becomes (0,0).

Can you please help?

Rgds
Rajani Kanth Badri

1 Reply

AD Administrator Syncfusion Team September 2, 2006 11:33 PM UTC

You can try turning off AllowOptimizeLoadTime property,

this.gridGroupingControl1.AllowOptimizeLoadTime = false;

in your form''s constructor to see if that avoids the problem.

Another thing you can try is to set the size to (1,1) instead of (0,0) to see if that gives you what you need without triggerring this problem.

Loader.
Live Chat Icon For mobile
Up arrow icon