Hi
I have a hierarchical grid that is bound to a DataSet. When I load new data into the grid the area where the grid is becomes black, which does not look very nice. Is there any way to avoid that black area? I set the UseOsThemes to false.
CheersDan
Hi Dan,
It's hard to say since I am not really sure what's causing this or exactly what you mean. Can you post a screen shot of what these black areas look like?
What exactly is your code doinbg when this happens? Can you explain in more detail exactly what "load new data in the grid" means? Are you setting the grid's data source, changing the data in the grid, changing the data in the underlying data source, or what?
Hi Mike
Unfortunately I'm not able to upload images because of our security system.
When I initialy load the data into the underlying data source (a DataSet), the whole rectancle where the grid control should be is black, afterwards when I load new data, the previously selected row and and the rectancle of the combobox, from where I selected the new data, is black.
Hm, it's really hard to say why that's happening. I've never seen that before. It sounds like some parts of the grid are not painting. Maybe you are calling BeginUpdate on the grid at some point?
The only suggestion I have is that you try to reproduce the behavior in a small sample project and Submit an incident to Infragistics Developer Support and maybe they can figure out why it's happening.
Hi Alex
I was merging two datasets in the background thread while the dataset, into which I merged data, was still assigned to the DataSource property of the grid. This was the reason for the black areas. Now I do the merging in the RunWorkerCompleted callback.
Kind regsDan
roeschda, Do you use grid.BeginUpdate() and grid_.EndUpdate() ?
I get black areas if code related to data loading placed between BeginUpdate() and EndUpdate().
But it sounds like this is normal behaviour, because BeginUpdate() forces all paint messages to be ignored until Infragistics.Win.UltraControlBase.EndUpdate() is called.
We are not using multithreading.
Mike, Is my assumption true?
Well, if you are using multiple threads, you should be aware that the grid is not thread safe, nor is the DotNet BindingManager. You might want to take a look at this discussion: Work with a dataset bound to a grid on a separate thread - Infragistics Forums
I think it happend because I had to transform and merge the incoming XML data and I did that in a separate thread using a background worker.