I just got these stacktraces when refreshing a grid:
at System.Drawing.Graphics.GetHdc() at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor() at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor(IContainer container)
at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.OnSelectedTabChanging(SelectedTabChangingEventArgs e) at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.RaiseEvent(UltraTabControlEventId id, EventArgs e) at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.OnManagerSelectedTabItemChanging(Object sender, SelectedTabItemChangingEventArgs e) at Infragistics.Win.UltraWinTabs.TabManager.set_SelectedTabItem(ITabItem value) at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.PerformDelayedInitialize() at Infragistics.Win.UltraWinTabControl.UltraTabControlBase.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
I.e., GDI is unhappy about something. However, I'm having a hard time tracking down where this problem first occurs. Any pointers? Is it a threading problem at all?
It seems to be a threading issue. What operations you are executing in “other” thread, and how they affect the grid. It seems to me that you are rebinding the grid, so the current band was disposed when grid is trying to be repainted and calls CellPaddingResolved which resolves to the StylePropertyCache which is null and throw this exemption. If you can provide us sample which demonstrates this I will be glad to investigate this further for you.
I am waiting for your feedback.