We have this strange issue where we have a RadComboBox that we interact with from the code behind.
Basically in certain situations, we want to change the SelectedItem or SelectedValue without firing off our SelectionChanged Event Handler. So we are first Unsubscribing our event handler from the RadComboBox like this:
radComboBox.SelectionChanged -= new SelectionChangedEventHandler(ourEventHandler);
We then set our SelectedItem property to the value we want like so:
radComboBox.SelectedItem = outItem;
And then we resubscribe to the SelectionChanged event like so:
radComboBox.SelectedItem += new SelectionChangedEventHandler(ourEventHandler);
The idea is that while we set our SelectedItem, there should be no event set and nothing should fire. However, this is not the case. Instead as soon as we resubscribe to the event, the event fires all the same. Is this a bug?
Basically in certain situations, we want to change the SelectedItem or SelectedValue without firing off our SelectionChanged Event Handler. So we are first Unsubscribing our event handler from the RadComboBox like this:
radComboBox.SelectionChanged -= new SelectionChangedEventHandler(ourEventHandler);
We then set our SelectedItem property to the value we want like so:
radComboBox.SelectedItem = outItem;
And then we resubscribe to the SelectionChanged event like so:
radComboBox.SelectedItem += new SelectionChangedEventHandler(ourEventHandler);
The idea is that while we set our SelectedItem, there should be no event set and nothing should fire. However, this is not the case. Instead as soon as we resubscribe to the event, the event fires all the same. Is this a bug?