Hi, I have a dropdown that I need to add available values in it while it is already loaded and have a selected item.
Look at my sample:
https://dojo.telerik.com/@foxontherock/ulONexoh/2
I just create an observable Array, bind it to my datasource, and run it. I select an item.
Then, I try to add a new one, using databinding, so I "push" it to the observableArray.
These are some issues I have:
When I open the dropdown after adding items, all the selections seems to be reversed (orange / gray)
If I don't reselect a new item, the last one - 1 is selected (reversed).
But the real selected one seems to be the last (new one) when calling the .text() method.
Also, if I call select(id-of-already-selected-item), it switch to it, but when i open the combo, all colors are reversed.
I also tried to:
combo.refresh()
combo.datasource.data(original list containing new item)
combo.datasource.data(copy of original list from .toJSON())
I never had any good results.
Looks like I need to destroy and recreate the combo from scratch if I want to add a new item !!
Thank you