Just wanted to know if anyone else is experiencing this problem.
I have a comboeditor with SuggestAppend. When someone keys in a letter, I trap the letter in ValueChanged, and see if the SelectedIndex has been set yet. Then I populate other fields based upon this selection.
When I converted from 10.3 to 11.2 (I have backed it out due to this problem), the SelectedIndex is not being fired when it reaches a matching entry in the combo, so my valuechanged code does not populate the other fields.
Under 10.3, when keying and reaching a selected item in the list, the selected item index would be set. It seems that under 11.2, the selecteditem index is not being set until the control loses focus.
I know I can use SelectedIndex rather than ValueChanged, but this will require hours of research and testing.
I am not able to move forward with 11.2 until I figure out what to do.
Hi,
I tried this out and both v10.3 and v11.2 behave exactly the same for me. I am attaching my sample here so you can take a look.
When I run this sample and type in "Grape", when I get to the last "e", the output looks like this:
Value: 3Text: GrapeSelectedIndex: 3
I get the same results in 11.2 and 10.3.
Please review to CAS-78926-JTBB92
They were able to recreate the problem and basically said "tough luck, change your code"
I was hoping someone else may have run into this problem, and had alternatives.
My alternatives are very costly right now. I have over 10 million lines of customer code, and it will take a minimum of 40 hours just to review and identify any potential problems... And, of course, my other concern, is what else has changed...
Do you have a detailed list of all changes for 11.1 and 11.2? Normally, I only look at the high level items, but being able to read the detail, I could see if anything seems out of place.
Roger
Hi Roger,
rogerbundy said:They were able to recreate the problem and basically said "tough luck, change your code"
I think they release a list of all of the bug fixes in a particular version and it gets installed with NetAdvantage, but I could be wrong, that's not really my area. I know there's a Breaking Changes list, also, but I'm not sure this particular bug fix was on it.
It's very unfortunate that you have code that was relying on a bug in the control, but I'm afraid there's not much we can do there. Sometimes changes have to be made in order to fix existing bugs. That's just the reality of software.
Anyway, you have a couple of options here. I beleive Developer Support suggested that you move your code from ValueChange to SelectionChanged. That works when I try it with your sample, but I am not sure it's the best solution, since I don't think SelectionChanged will fire when you type in something that is not a match for anything on the list.
Another option would be to continue using the ValueChanged event and get the matching item from the list yourself, rather than relying on the SelectedItem property. You can use the IValueList implementation of the ValueList on the combo to make this easier.
Private Sub UltraComboEditor1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraComboEditor1.ValueChanged Dim selectedItem As ValueListItem = Me.GetSelectedItem(sender) Try TextBox1.Text = selectedItem.DisplayText.Substring(3, Len(selectedItem.DisplayText) - 3) Catch ex As Exception ListBox1.Items.Add(ex.Message & " ") End Try End Sub Private Function GetSelectedItem(combo As UltraComboEditor) As ValueListItem Dim valueList As IValueList = combo.ValueList Dim i As Integer = -1 valueList.GetValue(combo.Text, i) Return combo.Items(i) End Function
I finished the code for the ivaluelist, and it is working.
Thank you.
Roger.
I just wanted to know if you were able to solve your issue based on Mike's suggestions or you still need help? Just let me know.
If you plan to go the IValueList route, then you might even be able to make things a little easier using Extension methods. If you haven't used them before, it's a new feature in the DotNet framework that allows you to add a method onto every instance of a specific type. So you could essentially expose a GetSelectedItem method from UltraComboEditor and that way all you would have to do is find all the places you are accessing the SelectedItem property and add a "Get" in front of it.
Extension Methods
Yes, selectedItem..
Reality is a tough concept. Getting eaten by a lion may be good for the lion, but I am sure I would not like it...
Thank you for your response. You have given me an alternative that I can try.