valuePrimitive默认为false;为true 时将选中项(Item)中绑定字段的值赋给View-Model字段
columns中
{ field: "CableGroup", title: "XXX", width: "190px", editor: groupEditor },
function groupEditor(container, options) {
$('<input class="ddlCableGroup" name="' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: true,
optionLabel: "请选择",
dataTextField: "Text",
dataValueField: "Value",
valuePrimitive: true,
dataSource: {
transport: {
parameterMap: function (options, operation) {
if (operation == "read") {
var parameter = {
id: 'D960F593-0EC9-4937-9549-8BDAF40B2570',
filter: "",
plant: "1201"
};
return kendo.stringify(parameter);
}
},
read: {
dataType: "json",
type: 'post',
contentType: "application/json",
url: "@Url.Action("GetCodeByTypeID", "CommonSelectCode")"
}
}
}
});
}