Here is my Kendo Drop Down List:剑道下拉列表中OnChange事件不工作
function modelProducer(container, options) {
$('<input name="ModelProducer" data-type="string"\">')
.appendTo(container)
.kendoDropDownList({
dataSource: modelProducerResult,
dataTextField: "model",
dataValueField: "model",
});
}
**
Here is the OnChange event which cant get the value of of my drop down list upon changing:
**
$(document).ready(function() {
function onSelect(e) {
if ("#DeviceType" in window) {
if (e.item) {
var dataItem = this.dataItem(e.item);
kendoConsole.log("event :: select (" + dataItem.text + " : " + dataItem.value + ")");
} else {
kendoConsole.log("event :: select");
}
}
}
debugger;
});
你确定了“如果(” #DeviceType“窗口){”是正确的?然后添加它:.kendoDropDownList({select:onSelect(e)}) – Ciccio
@Ciccio我在kendo文档中发现的是if(“kendoConsole”)...但是这里我的kendo下拉列表中有一个id, deviceType不知道我应该写什么 – mortezasol