I have a RadComboBox. AllowCustomText is enabled to allow filtering. When a user presses the Enter key it fires the OnSelectedIndexChanged event. I don't want the event to fire unless an item is selected. Unless an item is selected I don't want anything to happen.
Thanks for your reply. This certainly does prevent the Enter key from raising the event. But if a user has typed a few letters and found some matching items, then used the down arrow to highlight an item and then pressed Enter, I want the event to be raised.
Here's the approach I used... Add the OnClientSelectedIndexChanging handler to the RadComboBox.
This worked great, but later I found that when the control lost focus, it still raised the OnSelectedIndexChanged event on the server. So I wrote client code for OnClientBlur to prevent that too. However, it didn't work 100%, so I gave up and just handled it completely on the server-side.
I really believe the RadComboBox should only raise the OnSelectedIndexChanged event on the server when the selected index is actually changed.
0
Dimitar Terziev
Telerik team
answered on 21 Mar 2011, 05:10 PM
Hi Jon,
You are right that OnSelectedIndexChanged should be fired only when the index is actually changed.
This problem is due to a bug, which has already been logged.