Hi,
I have a bounded Ultracombo having following items in the list.
ID Code--------------------1 A 2 B3 Ccombo is binded with a table having two columns, ID and Code. DisplayMember is Code and ValueMember is ID. Whenever we type any data that is not in the list then ValueChanged event is firing twp times. Lets say I typed D in combo then
First time UltraCombo.Value comes as null and second time it comes as the data I typed ( "D" ). This is happening in 9.1 version dlls.In 8.1 version dlls it was working fine ( ValueChanged event was firing only once ). We were using 8.1 dlls and out application was designed to check value null for invalid data. After upgading the dlls all these problems get started.. Its crashing our application..
Are you guys going to fix this bug?
Thanks,Dhananjay
Hi Dhananjay,
I just tested this out in a small sample project and it seems to work fine for me. The event only fires once.
I am attaching the sample I used so that you can try it out and see if you get the same results. If you do, then there's some other factor at work in your application that is causing this. Maybe a property setting or the handling of an event.
If not, then it's probably because I'm usinga newer build than you and you should get the latest service release.
Hi Mike,
Why ultraCombo.Value is coming as invalid data? in earlier version dlls if we type invalid data ( If ValueMember does not match ) then Value was coming null. now its coming as typed invalid data... I think, earlier functionality was correct.. combo.Text should come as Typed text and Value should be null because ValueMember did not match.. Do you guys fix this Or this is new feature...?
ThanksDhananjay
Here is the stack trace of the first time the event ValueChanged is raise:
Infragistics2.Win.UltraWinEditors.v10.3.dll!Infragistics.Win.UltraWinEditors.TextEditorControlBase.FireValueChanged(System.EventArgs e) + 0x69 bytes
Infragistics2.Win.UltraWinEditors.v10.3.dll!Infragistics.Win.UltraWinEditors.UltraComboEditor.OnValueChanged(System.EventArgs args) + 0x10b bytes
Infragistics2.Win.UltraWinEditors.v10.3.dll!Infragistics.Win.UltraWinEditors.TextEditorControlBase.OnValueChanged(object sender, System.EventArgs args) + 0x11 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EmbeddableEditorBase.RaiseValueChangedEvent() + 0x2b bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EditorWithCombo.ProcessAutoComplete(System.Windows.Forms.Keys lastKeyDown) + 0x71e bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EditorWithCombo.ProcessTextBoxTextChanged(out bool selectionChangedByAutoEdit = false) + 0x4d bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EditorWithCombo.Infragistics.Win.IEmbeddableTextBoxListener.OnTextChanged() + 0xe3 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EmbeddableTextBox.OnTextChanged(System.EventArgs e = {System.EventArgs}) + 0x89 bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.WmReflectCommand(ref System.Windows.Forms.Message m) + 0xb1 bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.WndProc(ref System.Windows.Forms.Message m) + 0x42 bytes
System.Windows.Forms.dll!System.Windows.Forms.TextBox.WndProc(ref System.Windows.Forms.Message m) + 0x36 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EmbeddableTextBoxWithUIPermissions.WndProc(ref System.Windows.Forms.Message m) + 0x180 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x13 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 8465, System.IntPtr wparam, System.IntPtr lparam) + 0x64 bytes
And here is the second time:
Infragistics2.Win.UltraWinEditors.v10.3.dll!Infragistics.Win.UltraWinEditors.UltraComboEditor.OnValueChanged(System.EventArgs args) + 0x27f bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EditorWithCombo.Infragistics.Win.IValueListOwner.OnSelectedItemChanged() + 0x1e7 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.ValueList.SelectedIndex.set(int value) + 0x84 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.ValueList.Infragistics.Win.IValueList.SelectedItemIndex.set(int value) + 0x5 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EditorWithCombo.OnSuggestModeCloseUp(Infragistics.Win.IFilterableValueList valueList, int selectedIndex) + 0xe bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.EditorWithCombo.Infragistics.Win.IValueListOwner.OnCloseUp() + 0x1f4 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.ValueListDropDown.OnCloseUp(bool closeDropDownManager) + 0x90 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.ValueListDropDown.OnDropDownManagerCloseUp(object sender, System.EventArgs e) + 0x10 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.DropDownManager.Close() + 0x446 bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.DropDownManager.InternalCloseDropDown(System.Windows.Forms.Control owner) + 0x13c bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.DropDownManager.CloseDropDown(System.Windows.Forms.Control owner) + 0x3e bytes
Infragistics2.Win.v10.3.dll!Infragistics.Win.DropDownManager.DelayedCloseUp() + 0x30 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo(System.Windows.Forms.Control.ThreadMethodEntry tme) + 0x76 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(object obj) + 0x69 bytes
mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes
As you can see, this is not the same stack trace.
I think the reason why the event is raise 2 times instead of one is not a problem in my application; this is a bug in Infragistics.
Any workaround?
I found a reason where the event is raise 2 times:
Here is a sample code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For i As Integer = 0 To 10
UltraComboEditor1.Items.Add(i, i.ToString)
Next
UltraComboEditor1.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend
End Sub
Private Sub UltraComboEditor1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraComboEditor1.ValueChanged
MsgBox("ValueChanged")
End Class
If you type the value "1" in the combo, the ValueChanged is raise 2 times.
If you remove the line that set the AutoCompleteMode, the ValueChanged is raise one time.
It's a bug in Infragistics.
We are facing the same problem as well. May I know is there any workaround or fixes for this?
Please find my case which I am facing. I have 3 records having same Value but different Text. When I set the AutoCompleteMode to Suggest or SuggestAppend, all related event is being fired two times.
This happened when I entered the character manually in which UltraCombo control will show the filtered list based on the character(s) I entered. And when I use the mouse to click on the row I want, somehow the first Event fired will get the correct row, but the subsequence Event fired after that will have the first row selected.
Example,
My records is as below,
No ID Country
1 Chinese Hong Kong
2 Chinese China
3 Chinese Macau
4 Malay Indonesia
I configured my UltraCombo to take ID as the Value and Country as the Text. As I enter Chinese in the UltraCombo, the filtered list will only show first 3 records. When I click the 3rd record using the mouse, I realised that the first Event fired will take the correct Row which is Chinese (Macau). However, when the second Event fired, it will somehow take the first Row which is the Chinese (Hong Kong)
Please help and wonder is there any workaround for that? As my user want the AutoCompleteMode to be set as "Suggest".
Many thanks and hope to hear from you soonest.
What version of the controls are you using? Do you have the latest service release?
How to get the latest service release - Infragistics Community
We are using Infragistics2.Win.UltraWinGrid.v8.2 (UltraCombo)
I doubt we have apply any service release due to our company deployment policy.
Hence, I wonder is there any workaround I can do to handle this?
Thank you very much.
Sorry, I guess I was thinking about UltraComboEditor. There are no such events on UltraCombo.If you don't need multiple columns in your list, you might want to consider using UltraComboEditor, instead of UltraCombo. I don't think this problem occurred in both controls.
Can't find any Before/AfterExitEditMode events for UltraCombo. Anyway, thanks a lot for the info.
I don't think there's any way to work around this.
You can try using the Before/AfterExitEditMode events.
There is no event that fires when the user is finished typing, because it's impossible for the control to know when they are "finished". You might be able to make use of the Validating event, which will fire when they try to leave the control.
But personally, I doubt that any of these events will help.
Any work around you may think of? I don't think by any chances our company will take the risk to upgrade it to v10.3.
May I know what is the event UltraCombo control fire when it out of the edit mode? Or may I know what is the event fire when user finished entering the text manually in the text box?
If the latest service release for 8.2 is not working, then there's nothing we can do. That version is over 3 years old and is no longer being updated.