After retrieving the datasource, I am attempting to set the index on my kendo-ui dropdownlist. While I have been successful using a checkbox (which I would rather not use) and with a local json datasource, I am encountering issues setting the selected value based on the datasource returned from the transport.
I wonder why this method is not working as expected?
$("#products-dropDownList-remote").kendoDropDownList({
dataTextField: "ProductName",
dataValueField: "ProductID",
autoBind: false,
dataSource: {
transport: {
read: {
dataType: "jsonp",
url: "http://demos.telerik.com/kendo-ui/service/Products"
}
},
requestEnd: function (e) {
//Can the selected value be set here after a successful request?
$("#products-dropDownList-remote").data('kendoDropDownList').select(1);
}
}
});
//Although it seems unlikely, according to this forum discussion
//it should work, but it doesn't.
$("#products-dropDownList-remote").data('kendoDropDownList').select(1);
For the demonstration of all three options, you can visit this jsFiddle link - http://jsfiddle.net/bensjones/H47b3/
Any recommendations or suggestions are welcome!