【发布时间】:2015-07-28 10:49:08
【问题描述】:
我正在使用剑道下拉菜单:
HTML:
<input id="field_timezone" style="width: 275px;" tabindex="4">
JS:
resultList = $.parseJSON(response.d); //data via ajax call
$("#field_timezone").kendoDropDownList({
dataTextField: "TimeZoneDescription",
dataValueField: "TimeZoneID",
dataSource: resultList,
optionLabel: {
TimeZoneDescription: "Choose",
TimeZoneID: ""
}
});
我正在尝试查找下拉菜单中应显示哪些值/文本对。
我试过了:
alert(JSON.stringify($('#field_timezone').data('kendoDropDownList').dataSource.data()));
或者
alert(JSON.stringify($('#field_timezone').data('kendoDropDownList').dataSource._data));
给出了用于数据源的列表,但它缺少“选择”选项,并且没有选项来找出哪些字段用于值或文本。
【问题讨论】:
标签: javascript jquery kendo-ui kendo-dropdown