We are getting this error when deleting the text in Combo Editor which trigers Value Changed and ItemNotinList event.
The following is the stack trace
" at Infragistics.Win.EditorWithCombo.get_SelectedIndex()\r\n at Infragistics.Win.EditorWithCombo.ProcessTextBoxTextChanged(Boolean& selectionChangedByAutoEdit)\r\n at Infragistics.Win.EditorWithCombo.Infragistics.Win.IEmbeddableTextBoxListener.OnTextChanged()\r\n at Infragistics.Win.EmbeddableTextBox.OnTextChanged(EventArgs e)\r\n at System.Windows.Forms.TextBoxBase.WmReflectCommand(Message& m)\r\n at System.Windows.Forms.TextBoxBase.WndProc(Message& m)\r\n at System.Windows.Forms.TextBox.WndProc(Message& m)\r\n at Infragistics.Win.EmbeddableTextBoxWithUIPermissions.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)\r\n at System.Windows.Forms.Control.WmCommand(Message& m)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)\r\n at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)\r\n at System.Windows.Forms.Control.DefWndProc(Message& m)\r\n at System.Windows.Forms.Control.WmKeyChar(Message& m)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.TextBoxBase.WndProc(Message& m)\r\n at System.Windows.Forms.TextBox.WndProc(Message& m)\r\n at Infragistics.Win.EmbeddableTextBoxWithUIPermissions.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)\r\n at System.Windows.Forms.Form.ShowDialog()\r\n at Program.Main() in \\Program.cs:line 257"
All your help will be greatly appreciated.
Hi Kavitha,
Since the original post is about deleting text, it does not seem like this is in any way the same scenario.
If you are getting the same error message, then that makes sense and the error message is pretty clear. You can't access the SelectedIndex when the editor is not in edit mode. So trying to do so in the AfterExitEditMode event, when the control is, by definition, not in edit mode, will not work.
Hi,
I have same scenario.. I have used AfterExitEditMode method to get typed value or selected value in UltraComboEditor
It's hard to tell what would have change to cause an error based only on this code. My guess it it might have something to do with the AutoComplete logic that is tied to the combo editors, but I can't really say for certain. If you can attach a small sample project to this post, I'll be happy to look into it. You could also submit an incident to Developer Support.
-Matt
Hello,
First of all, I appologize for the late response, I had responded to the email that was generated from this thread and did not realize that it was a no-response email.
Yes, the below code contains a CollapseAll() function, this is the problem piece of code. If I comment out the CollapseAll() line the error stops.
Private Sub gridTaxReturnDetail_CellListSelect(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles gridTaxReturnDetail.CellListSelect
If e.Cell.Column.Key = NCS_TaxReturnDetailInfo.strFormTypeID Then
If Not e.Cell.Value Is System.DBNull.Value Then
Dim _intIndex As Integer = e.Cell.Column.ValueList.SelectedItemIndex
_intPreviousTaxReturnDetailFormTypeID = e.Cell.Value
_intCurrentTaxReturnDetailFormTypeID = e.Cell.Column.ValueList.GetValue(_intIndex)
If _intCurrentTaxReturnDetailFormTypeID <> _intPreviousTaxReturnDetailFormTypeID Then
If e.Cell.Row.IsExpanded Then
'e.Cell.Row.CollapseAll()
_blTaxReturnDetailFormTypeIDChanged = True
End If
End Sub
This code worked fine in 2008.1. I did not update until 2008.3 and this is when the error started happening. I updated again to 2.9.1 but the error persisted. Please let me know how I could get around this.
Thank you!
Can you provide any additional information about how your UltraComboEditor is setup, which properties are set, etc? It seems like, from the stack trace, the AutoCompleteMode property is set, but I can't seem to reproduce this problem. It would be much easier if you could post a small sample demonstrating the problem, since I can't seem to reproduce the issue on my machine despite attempting various combinations of AutoCompleteMode, LimitToList, and attempting to set the Text or Value via a button click so that the editor isn't in edit mode.