I have some setup code early in my view that says...
_view.EditorSecurityCombo.ValueChanged += OnEditorSelectedSecurityChanged;
EditorSecurityCombo is an UltraCombo. When the view is first set up, selecting an item in the display does what you'd expect, and calls OnEditorSelectedSecurityChanged. However, when you then select another item from the combo, OnEditorSelectedSecurityChanged is NOT called.
Any ideas? Should I be hooking something other than ValueChanged?
Hi Maury,
I can see no reason why the event would not fire, unless maybe every item on your list has the same value. But there's not really much information here to go on.
Can you duplicate this in a small sample project?
I wouldn't know where to start.
But there is an oddity worth mentioning, maybe this will twig something. In addition to the ValueChanged handler, I also have a DoubleClick that calls this method:
private void OnQuoteSelectedSecurityCleared(object sender, EventArgs e)
{
if (_refreshing == false)
_view.MonitorSecurityCombo.Text = "";
}
This method never fails to be called. When it is, the ValueChanged handler is called immediately thereafter, and then the combo box works properly again for one more selection. Then it stops again until you do another double-click.
Maddening!
Maury
This was due, in the end, to a corrupted designer file. I edited a completely unrelated UltraCombo, and poof.
Maury Markowitz said:I wouldn't know where to start.
Make a copy of your project, then start removing everything but the Combo and see if the problem still occurs.
Maury Markowitz said:No, the Values are not all the same.
What kind of values do you have on the list? What is the DisplayMember field and what's the DataMember field?
Ok, I have no idea why, but using TextChanged instead of ValueChanged works fine. No, the Values are not all the same.