"Parameter is not valid.
at System.Drawing.Graphics.GetHdc() at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor() at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor(IContainer container) at MyGrid..ctor()"
For some reason, after a period of time, whenever one of my win forms loads, and there's a grid to be initialised, I get the above error. The error persists until the application is restarted. Has anybody else seen this? I am using 8.3.20083.2021. I'm sure I've seen somewhere that it may be down to the number of window handles it uses up, as there is a leak of sorts. I realise that I could upgrade to the latest version, but management will not allow this unless there is a very good reason as it envolves a mass roll out to thousands of user machines. Perhaps there is a hot fix.
If somebody could let me know in which version it was found and perhaps in which version is has been fixed?
Thanks for any help, Andrew
Where can I get the service Release for 13.1.
Yes, my application use background threads. but we didn't have this issue with the earlier version of infragistics but just this release.
Hi Ranee,
There's not much we can do about an issue like this unless we can reproduce it.
Again, even though you updated to the latest version, it still might be that this is an issue that was fixed in the service release, so I would recommend getting the Service Release for 13.1 and see if that helps.
The second exception you listed here could be caused by a threading issue. Is your application creating any background threads?
Beyond that... is it possible for you to post a small sample project here that reproduces the exception so we could check it out?
Hi Mike,
Our application was using the old version of infragistics(8.0 version), now we have upgraded it to v13.1. We didn't redo all the form just updated with the new version of infragistics. Now and then the user are getting this.
System.Drawing.Graphics.GetHdc()
at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor()
at GLS.Framework.UI.BaseForm.InitializeComponent()
at GLS.Framework.UI.BaseForm..ctor()
Also other items we are getting this error
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at System.Data.DataView.System.Collections.IList.get_Item(Int32 recordIndex) at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRowsHelper(IList boundList) at Infragistics.Win.UltraWinGrid.RowsCollection.SyncRows() at Infragistics.Win.UltraWinGrid.RowsCollection.VerifyGroupByVersionHelper() at Infragistics.Win.UltraWinGrid.UltraGridRow.get_ParentRow() at Infragistics.Win.UltraWinGrid.UltraGridRow.get_BaseHeight() at Infragistics.Win.UltraWinGrid.UltraGridRow.get_HeightInsideRowBorders() at Infragistics.Win.UltraWinGrid.UltraGridRow.GetLevelHeight(Int32 level) at Infragistics.Win.UltraWinGrid.UltraGridColumn.AdjustForCellLevel(Rectangle& rect, UltraGridRow Row) at Infragistics.Win.UltraWinGrid.RowCellAreaUIElementBase.AddElementHelper(UIElementsCollection oldList, Type type, Rectangle rcElement, Rectangle rcClip, UltraGridRow row, UltraGridColumn column, Boolean& sameRow, Boolean activeRowStatusChanged, Boolean rowLayoutMode)
at Infragistics.Win.UltraWinGrid.RowCellAreaUIElementBase.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.RowColRegionIntersectionUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive)
at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify, Boolean syncMouseEntered) at Infragistics.Win.ControlUIElementBase.ProcessMouseMoveHelper(Object sender, MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseMove(Object sender, MouseEventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Any help or suggestions will be really helpful.
Hi Kuldeep,
Without more information about when the problem occurs, I'm afraid I cannot guess what's causing it. The best suggestion I can offer is that you upgrade to the latest service release (if you don't already have it) and see if that helps.
How to get the latest service release - Infragistics Community
Hey Mike,
There is no certain scenario in which it is reproducing. Client was not doing anything with excel exporting etc at the time the error popped up.
And client is also using the same version of Infragistics as I am.
Please let me know if any workaround is available.
Thanks,
Kuldeep