Hi All,
We are using GridGroupingControls in our application. All our calls to the GGCs are threadsafe. Still, during the form load, we are getting error(pasted below) from GGC. Can any body plz throw light on why itz happening?
Thank you
Rajani Kanth
==========error=================================
Invalid parameter used error.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
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)
AD
Administrator
Syncfusion Team
November 11, 2005 03:36 PM UTC
Something to try.
In your form, override OnLoad. There, before calling the baseclass, do a grid.InvokeRequired check to see if this OnLoad is being called from the thread that created the grid.
BR
Badri Rajani Kanth
November 11, 2005 05:40 PM UTC
HI,
I am not calling base class any where. I have added the code
if (grdCallSheet.InvokeRequired)
{
Debug.WriteLine("INVOKE CALLED");
}
in the form constructor, as well as Load event.
In runtime, The code was called first in constructor and then in Load event. Both the times, grdCallSheet.InvokeRequired is FALSE.
Is it giving any clue?
Rgds
RajaniKanth
>Something to try.
>
>In your form, override OnLoad. There, before calling the baseclass, do a grid.InvokeRequired check to see if this OnLoad is being called from the thread that created the grid.
AD
Administrator
Syncfusion Team
November 11, 2005 05:57 PM UTC
The reason I suggested to add an OnLoad override was because it is explicitly listed in the call stack above, but it is not likely that OnLoad is being called from another thread anyway.
I did a search in our support incident data base, and the was one other hit on OptimizeLoadTime. In that case, the height of the bitmap was zero and was causing the exception. The user reported back that the problem had to do with something he was doing with isolated storage. Are you using isolated storage for any reason?
BR
Badri Rajani Kanth
November 14, 2005 03:58 PM UTC
Thank You Clay!
Ours is also similer case and we have fixed at our end.
Rgds
Rajani Kanth
>The reason I suggested to add an OnLoad override was because it is explicitly listed in the call stack above, but it is not likely that OnLoad is being called from another thread anyway.
>
>I did a search in our support incident data base, and the was one other hit on OptimizeLoadTime. In that case, the height of the bitmap was zero and was causing the exception. The user reported back that the problem had to do with something he was doing with isolated storage. Are you using isolated storage for any reason?