Hi,
We have a very large Winforms project that utilizes Infragistics 21.1.20211.24. A new screen was added that uses the UltraWinGrid and we are having getting the "Error creating window handle." exception very frequently.
In this grid, there are 5 editable String columns and 1 editable numeric column ("ID"). We are only seeing this issue when the user moves from one of the string columns in an existing row to the numeric (ID) cell in the "AddRow" or vice versa (from the ID in the AddRow to a string cell in an existing row). If the user moves from a String Cell in an existing row to a String cell in the AddRow, we don't see the problem. If you look at the stack trace below, it does not appear to be anywhere in our code:
System.ComponentModel.Win32Exception (0x80004005): Error creating window handle.
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.TextBoxBase.CreateHandle()
at System.Windows.Forms.Control.RecreateHandleCore()
at System.Windows.Forms.TextBox.set_CharacterCasing(CharacterCasing value)
at Infragistics.Win.EmbeddableTextBox.Initialize(EmbeddableUIElementBase owningElement)
at Infragistics.Win.EditorWithText.DisplayTextBox()
at Infragistics.Win.EditorWithText.OnBeforeEnterEditMode(Boolean& cancel)
at Infragistics.Win.EmbeddableEditorBase.EnterEditMode(EmbeddableUIElementBase embeddableElement)
at Infragistics.Win.UltraWinGrid.UltraGridCell.EnterEditorIntoEditMode(Boolean byMouse)
at Infragistics.Win.UltraWinGrid.UltraGridCell.EnterEditMode(Boolean byMouse, Boolean showingDropDown)
at Infragistics.Win.UltraWinGrid.UltraGridCell.SetFocusAndActivate(Boolean byMouse, Boolean enterEditMode, Boolean byTabKey)
at Infragistics.Win.UltraWinGrid.CellUIElementBase.OnEmbeddableElementMouseDown(Object sender, EmbeddableMouseDownEventArgs e)
at Infragistics.Win.UltraWinGrid.GridEmbeddableEditorOwnerInfoBase.OnEditorMouseDown(EmbeddableUIElementBase embeddableElem, EmbeddableMouseDownEventArgs e)
at Infragistics.Win.EmbeddableUIElementBase.RaiseMouseDownEvent(EmbeddableMouseDownEventArgs e)
at Infragistics.Win.EmbeddableUIElementBase.OnMouseDown(EmbeddableMouseDownEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.EditorWithTextUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.TextUIElementBase.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Also, once they acknowledge the error, the user can continue on without an issue (at least until they move to the ID column in the new "AddRow"... Then they usually get the "Error creating window handle." message again...)
Also, memory does not appear to be an issue... We have tested with no other screens and applications opened and very little data loaded into the grid and we still see the error.
Any help would be greatly appreciated.
Thanks,
Jason
We seem to have found the issue...
It appears the the String columns all had the CharacterCasing set to "Upper" but the ID (numeric) did not have it set. When we set the CharacterCasing to Upper on the the ID column, the problem was resolved.
Great, thanks for reaching out and let us know if you have any questions.