The provided sample project is greatly appreciated.
After a deep look into your code, I have found out that you are using an approach with two-way cascading combo boxes in combination with auto complete functionality. In this case when you type "Plu
" in the Detail RadDropDownList
the auto complete popup with suggestions is opened. Then, you select the first item in the pop-up("Plum"). This triggers the SelectedValueChanged
event in RadDropDownList
, where your logic is executed. You assign a value to the Category RadDropDownList
and then, based on this value, you repopulate with items the Detail RadDropDownList. This all happens while the auto complete pop-up is trying to set SelectedIndex
to the Detail RadDropDownList. When the pop-up was opened the selected index of "Plum" is 14, but after the rebind the total amount of items in Detail RadDropDownList is reduced to 5. Now, the pop-up tries to set SelectedIndex
, but this is not valid anymore and that is why the last item is selected(the "Strawberry" item).
I have invested some time and effort to find a solution for this case and most of the time this two-way cascaded combos were into a dead lock situation. Fortunately, I have managed to find a working solution for your case, when I moved your rebinding logic when Detail RadDropDownList loses the input focus(on the Leave
event). Refer to the attached project
An alternative solution is to use a one-way combo-box direction, as this will reduce the complexity of the code. For example: a car type drop down and a car model drop down - you cannot enter the model until the make field is empty.
I hope this helps. Should you have any other questions do not hesitate to ask.
Get quickly onboarded and successful
with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.