I have a input field that I've transformed into a kendoDropDownList. Passed in it's options is a select callback that does some stuff when the user selects a new value.
e.g
$("#MyDropDownList").kendoDropDownList({
optionLabel: "Choose...",
dataTextField: "MyTextField",
dataValueField: "MyValueField",
dataSource: myDataSource,
select: function (e) {
// Do some stuff
}
});
This bit works fine as long as the user is doing the selecting the value via the gui. The stuff that needs to occur when a value is selected occurs.
The problem occurs if I need to change the selection from code. I have something like this:
// Select dropdown entry by index
$("#MyDropDownList").data("kendoDropDownList").select(0);
When I do this, my select callback isn't called. Is there something I'm doing wrong here? Or should I just take the code that happens on select into it's own function and call that myself when I need it to fire?