We have started deploying an app to users that uses the Win Forms controls. We are starting to see a lot of these exception errors from client computers. What causes the error below? It's always with the Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Infragistics.Win.UltraWinGrid.ComboDropDownControl.
v 8.3.20083.1009
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 A generic error occurred in GDI+. at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) at Infragistics.Win.DrawUtility.DrawStringHelper(Graphics gr, String text, Font font, SolidBrush brush, Rectangle bounds, StringFormat stringFormat, GdiDrawStringFlags drawStringFlags) at Infragistics.Win.DrawUtility.DrawString(Graphics gr, String text, Font font, SolidBrush brush, RectangleF bounds, StringFormat stringFormat, GdiDrawStringFlags drawStringFlags) at Infragistics.Win.DrawUtility.DrawStringHorizontalFlowHelper(DrawStringParameters& parameters) at Infragistics.Win.DrawUtility.DrawStringHorizontalFlow(DrawStringParameters& parameters) at Infragistics.Win.DrawUtility.DrawString(DrawStringParameters& parameters) at Infragistics.Win.UIElementDrawParams.DrawStringHelper(Rectangle rectInsidePadding, String textToRender, Boolean multiline, Boolean wrapText, TextUIElementBase textElement, Size& textSize, Rectangle& textArea, Int32& charactersRendered) at Infragistics.Win.TextUIElementBase.DrawForeground(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraWinGrid.ComboDropDownControl.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hi,
Sören Kuklau said:Is there a way to tell the grid to only render the first x characters?
No, there's no property for this, but this is actually how we fix these issues in general - by just telling the grid to render as much of the string as it can. If you are experiencing this issue in 15.1 and you have the latest service release, then this must be a new instance where the error occurs.
Can you reproduce this in a small sample project so we can check it out and get it fixed?
BTW... A DrawFilter would work fine and there wouldn't be any noticeable performance hit unless you did something wrong. A CreationFilter would actually be better because you could simply change the Text on the TextUIElement and that should essentially be no performance hit at all.
I have what is presumably a related issue with very long text, with 15.1.20151.2132.
There are a number of causes for this error. Unfortunately, the error message doesn't tell you much, so its hard to say what's causing yours.
If I recall correctly, one reason for this error is if the string being draw is too large, like more than 10,000 characters.
There have been a number of fixes put in place over the years, so you might want to just try updating to the latest service release and see if the issue is already fixed.
How to get the latest service release - Infragistics Community