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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDI+ Exception in GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

19843 Oct 5,2004 11:40 AM UTC Oct 6,2004 05:09 AM UTC WinForms 3
loading
Tags: GridControl
Maqsood Ahmed
Asked On October 5, 2004 11:40 AM UTC

I have got the following exception: ---------------- System.InvalidOperationException: The object is currently in use elsewhere. at System.Drawing.Graphics.EndContainer(GraphicsContainer container) at System.Windows.Forms.DibGraphicsBufferManager.ReleaseBuffer (GraphicsBuffer buffer) at System.Windows.Forms.GraphicsBuffer.Dispose() 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 .

Administrator [Syncfusion]
Replied On October 5, 2004 12:25 PM UTC

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 1.6.1.9 or something earlier? Searching our Direct Trac incidents shows one occurrence of a similar exception, but that was more that a year ago before 1.6.1.9 was released. You might want to try the 2.1.0.9 release. If you can send me a sample that reproduces the problem, I can try it here.

Maqsood Ahmed
Replied On October 6, 2004 04:12 AM UTC

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 1.6.1.8.

Administrator [Syncfusion]
Replied On October 6, 2004 05:09 AM UTC

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.

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.

Warning Icon 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.Close Icon

;