Hello,
We are currently using Infragistics controls 10.3. And we are using Ultragrid in a lot of places. And in few of the places we have used the ultragrid editor, we keep getting the following exceptions.
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.TextBoxBase.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
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.UltraGridCell.SetFocusAndActivate(Boolean byMouse, Boolean enterEditMode)
at Infragistics.Win.UltraWinGrid.CellUIElementBase.OnEmbeddableElementMouseDown(Object sender, 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.UIElement.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.UltraControlBase.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.Control.ControlNativeWindow.WndProc(Message& m)at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Although we are not sure what causes this exception, the users have a left a couple of comments when these exceptions are caused. Some of them have been pasted below.
"BILL BALANCE, ENTERING INVOICE AMOUNT; PO #904151"
"trying to add invoice number"
"invoice tab; entering invoice number"
Now the invoice tab has an ultra grid and the user can add rows to the grid one at a time ( Screen shot has been attached ). As you can see from the image, the grid is pretty straight forward, it has like 5 columns in Band 0 and 3 more columns in Band 1. Column Invoice Amount has a UltraCurrency Editor as an Editor component.
The user seems to be getting this error when he is editing any of these columns.
I am not sure what is causing this error, but any help would be appreciated.
Thanks,
Ashwin
Ashwin,
The 2010 volume 3 version is getting rather old. Would you be able to upgrade your application to the latest version of Infragistics?
Is it possible for you to provide more detail about the cause of this issue in your application? Are you able to send us a reproduction sample so that I can look into it?
There is no event that we fire when an exception occurs, but you can click Debug->Exceptions on the Visual Studio main menu and make sure you have the 'Common Language Runtime Exceptions' checked. That will cause execution to halt at the line of code on which the exception occurs.
If you can replicate this in a simple project that you can attach to this thread, we can take a look. If not, try to nail down the exact steps.
If I may, what is the recommended way to catch this exception, or break into the code while debugging, when this exception occurs? What I mean is, is there an event like similar to an ErrorEventHandler that could be handled before this exception occurs?
I am attempting to debug the exact same stack trace as outlined in the beginning of this thread. While I do not currently have an exact step-by-step way of replicating this exception, there is a way to generate the error somewhat reliably through a seemingly random set of click, edit, save, key press, etc. When this issue occurs, a message pop-up appears with the message "Cannot access a disposed object. Object Name: 'EmbeddableTextBoxWithUIPermissions'". Is there a way to break in the code before this pop-up appears or is there an event that should be handled to be able to better see what's going on?
For what it's worth, we are upgrading from the v10.3.dll to the v14.1.dll soon, however I am able to reproduce the exact same exception, albeit with a different stack trace using the v14.1.dll.
Regards,
Ben