Version: NetAdvantage Select 2010 Vol. 3 (WinForms)Component: Infragistics Ultragrid
Operation system with error: Windows XP Pro
---------------------------
A customer of us is experiencing the "red cross" error followed with an error messages that states:
"object is currently in use elsewhere"
System.InvalidOperationException: The object is currently in use elsewhere
by System.Drawing.Graphics.get_Transform();
by Infragistics.Win.Graphics.Transform.TransformRectangle(Graphics ... ).......
..............
This error throws itself when an user is (re)loading (refresh) the grid with data or using the filter fields on the grid when the data has been bound to the grid.
The application don't use multithreading. There are also no special techniques or such used. Just retrieve data from the SQL server (on the server) and databind the datatable to the grid in the client application.
We never had such experience with this component and other customers with the same application never had or having this problem (running other OS). We also can't reproduce this error on our own developer PC's and on our customer demo server.
Can someone help me in finding out why and how it's possible this customer is the only one experiencing this on all of its workstations or where I have to look for the real cause.
Hello,
I'm sorry for the late response.
The problem still exists but I have narrowed the cause down to the following:
- The red cross only occurs when an user use the filterrow in the ultragrid.
Our customer has sent us screenshots where u can see the red cross but also the first typed letter in a filter field under de columnheader.
So after the first typed letter into this field the red cross is shown.It's configured (default component config) that the grid automatically filter the results after each letter typed.
Hello JerryDK,
Please let us know if you still have any other concerns regarding the behavior at your end.
Hi,
JerryDK said:The first thing I'm going to do then is requesting all of the specifications of some of the workstations of this customer. The only "strange" software I saw was software that connected their telephones with the workstations. They can call or answer the telephone with the software. Maybe this can interfere with Infragistics or our application.
When I mentioned other software running on the machine, I was thinking along the lines of software that modifies the look of windows. There are certain third-party application which modify Windows to provide support for themes or changing the appearance of Windows form title bars.
A red X like you are getting here indicates that an exception occurred while the control was in the OnPaint method. So whatever is causing this may be graphics-related.
Of course, painting the grid requires the grid to access the data source so it know what values to paint on the screen. So it's also possible that something is interfering with the data source - which is why this kind of error often indicates a threading issue.
JerryDK said:The user press the button and it retrieve on the same thread data from the database and databind it as a datatable to the grid.
If you cannot track down the cause of the problem, one thing you might want to try is to take the code out of the Button_Click event and instead put it into a method. Then call that method from the Button_Click via a call to BeginInvoke instead of directly. This will create a small delay between the time when the button is pressed and the time when the code is executed. This should allow the grid to finish up whatever it may have been doing before the re-binding occurs and it might work around the exception.
Thank you for replying!
I'm for 100% sure there is no multithreading in the application.
The form is just a simple form with the ultragrid on it and a button to refresh the data.The user press the button and it retrieve on the same thread data from the database and databind it as a datatable to the grid. Maybe not a nice solution but it works for this customer and others.
Also they use the same assemblies of Infragistics as all of our other customers. This one I know for sure because I've build the projects, distributed and installed these applications.The first thing I'm going to do then is requesting all of the specifications of some of the workstations of this customer. The only "strange" software I saw was software that connected their telephones with the workstations. They can call or answer the telephone with the software. Maybe this can interfere with Infragistics or our application.
As soon as I have discovered some differents that can matter I will post it here.Offcourse when I have the answer I will post it also.
Issues like this are extremely difficult to track down - especially if you are unable to duplicate them.
Are you absolutely certain that your application is not using any multi-threading at all?
If so, then the best I can suggest is that you try to find out what's different on the one machine where this is occurring. Perhaps they are using different versions of the Infragistics assemblies? Or perhaps they have a different version of the DotNet framework installed? Maybe there is some other application running on the machine which is interfering with your application?