I have got the following exception:
System.InvalidOperationException: The object is currently in use
at System.Drawing.Graphics.EndContainer(GraphicsContainer container)
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)
during my research at the internet about such exceptions I had found that this is related to GDI+ double buffering. Is there any way to prevent such exceptions in future?? or do the latest Syncfusion versions cater this situation.
I am using Syncfusion GridControl 1.6.x .
ADAdministrator Syncfusion Team October 5, 2004 07:25 AM
Are you using multiple threads? This can lead to objects in use problems if the threading is not being handled taken into account when accessing the grid object.
Are you using 188.8.131.52 or something earlier? Searching our Direct Trac incidents shows one occurrence of a similar exception, but that was more that a year ago before 184.108.40.206 was released.
You might want to try the 220.127.116.11 release. If you can send me a sample that reproduces the problem, I can try it here.
MAMaqsood AhmedOctober 5, 2004 11:12 PM
I tried to reproduce this exception but it didn''t show up again. As for the multiple threading issue, I am doing all grid updates in the UI thread (using Invoke) so i think it is out of question. I am using 18.104.22.168.
ADAdministrator Syncfusion Team October 6, 2004 12:09 AM
So just to confirm, before accessing the grid, you are calling grid.InvokeRequired to make sure you are on the grid''s thread.
If you run your application on a multi-processor system, do the problems show up much more quickly? If so, this might be an indication that threading is playing a role in the problem.
Unless you can send a sample, the best suggestion I have is to try your code with the latest release.