Sorry for the duplicate post I did not know there was a forum specifically for the Ultragrid.
I seem to be running into some type of threading issue, it might be a race condition or something similiar. I have an Ultragrid with a bunch of rows. I filter the rows using one of the columns and then I perform some action. I then call the Ultragrid.Rows.Refresh(RefreshRow.ReloadData) method and my GUI becomes unresponsive. So my question is, is there someway to determine when the call to Ultragrid.Rows.Refresh is complete? This method does not have a return value so I was wondering if there was some other way to determine when the Refresh is complete. Also I was wondering if the Refresh is performed on the main HMI thread.
I am running Windows 7 and have Infragistics 10 installed on my machine.
Hi,
The grid doesn't use any other threads internally, it's always on the UI thread. Is your application using other threads? Threads can be extremely tricky when DataBinding is concerned and neither the grid, nor the BindingManager in DotNet are thread safe.
The Refresh method may just be dirtying a flag and then the actual refresh operation occurs on the next paint message. The grid does a lot of things asynchronously like that. But if you called Rows.Refresh followed immediately by grid.Update, that should be nearly the same as a synchronous operation.
If your application is not creating threads, then I doubt this is a threading issue.
What version of the grid are you using?
Are you able to reproduce the lockup reliably? If so, can you post a small sample application demonstrating it so we can take a look?
Here is a little more information on the issue that I am seeing where the GUI with the UltraGrid on it becomes unresponsive:
We are using Infragistics 10 and I am on a Windows 7 machine. We use a BindingSource with a type of a custom collection we built and this serves as the DataSource for the UltraGrid. The custom collection implements the following interfaces: IListSource and ICollection. Whenever the custom collection is updated the following 2 calls are made to refresh the grid:
grid.Rows.Refresh(RefreshRow.ReloadData)
grid.DisplayLayout.RefreshFilters
I am able to duplicate the issue but I am unable to post the code to this forum. There are 2 strange things that I noticed.
- This issue only occurs when I filter on 1 particular column in the grid. If I filter on any other column in the grid, the GUI does NOT become unresponsive.
- We recently upgraded all of our COTS products, which included upgrading Infragistics, Visual Studio and we went from Windos XP to Windows 7. When I run the exact same code, on the exact same data using the previous version of Infragistics (I believe we had version 8 installed) and the previous version of Visual Studio we do not see the error. Which leads to my question of, was there any major upgrades to the Ultragrid when going from version 8 to version 10.