我的 kendodropdownlist 有问题...每当我在其上添加选项标签时,它总是显示未定义字段..我怎样才能摆脱下拉列表中的未定义...下拉列表的功能很好,只是这个词“ undefine”真的让我很烦。
这是我的代码:
<input id="ddlWorker" name="ddlWorker" class:"validate[required] inputLong" style="width: 400px;" value="@workerPosId" />
$("#ddlWorker").kendoDropDownList({
dataTextField: "workerName",
dataValueField: "workerID",
autoBind: false,
optionLabel: {
workerName: "-- Select An Option --",
workerID: ""
},
// define custom template
template:
'<h5>${ data.workerName }</h5>' +
// '<p>${ data.workerID }</p>' +
'<p>${ data.AvailableDay_LookID }</p>' +
'<p>${ data.StartTime } - ${ data.EndTime }</p>',
dataSource: {
transport: {
read: {
url: '/Client/LoadWorkerDropdownList?clientCusPosShiftId=' + clientCusPosShiftId,
dataType: "json",
type: "POST"
}
}
}
});
var dropdownlist = $("#ddlWorker").data("kendoDropDownList");
谢谢