No one on stackoverflow.com can answer this, and I can’t find it myself. GQ has rarely failed me before. Can anyone help?
To wit:
I have the following html for a Kendo MVVM DropDownList:
<select id="responseTypeDDL"
data-role="dropdownlist"
data-text-field="SystemResponseTypeCode"
data-value-field="SystemResponseTypeId"
data-bind="source: responseTypes">
</select>
This is my view model:
SC.ViewModels.Reference.ResponseTypeDataSource.read(); // successfully reads data
var responseTypeDDL = kendo.observable({
responseTypes: SC.ViewModels.Reference.ResponseTypeDataSource
});
kendo.bind($("#responseTypeDDL"), responseTypeDDL);
The ResponseTypeDataSource.read() method returns a list of “XML” and “JSON”, and these are the values that get added to the dropdown. This is the SystemResponseTypeCode field. I also read another data item from the database and check its response type. Let’s say it is “JSON”. How do I set the drop down to have “JSON” selected?