首页 > 其他分享 >kendoDropDownList - valuePrimitive

kendoDropDownList - valuePrimitive

时间:2023-03-02 11:02:30浏览次数:34  
标签:valuePrimitive kendoDropDownList container groupEditor operation true

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")"
}
}
}
});
}

标签:valuePrimitive,kendoDropDownList,container,groupEditor,operation,true
From: https://www.cnblogs.com/jxw-29/p/17171034.html

相关文章