需要帮助。
Kendo网格代码:
$('#triggerParameterData').kendoGrid({
columns: [{field: "name"},{field: "value"},{field: "description"}],
selectable: "multiple,row",
pageable: false,
scrollable: false,
editable: true,
dataSource: {
data: popup, schema: {
model: {
fields: {
name: { editable: false },
description: { editable: false },
}
}
}
},
})
我想将第二行值单元格放入复选框。如果有人有解决方案请分享。 特别感谢。
答案 0 :(得分:0)
参考:Kendo Grid Columns.Template
.....
columns: [
{field: "name"},
{field: "value", template: '<input type="checkbox" value="#: value #">'},
{field: "description"}
]
......
答案 1 :(得分:0)
使用此fiddle
<强> JS:强>
var popup = [ { value:true, name: "Enos", description: "Es" },
{ value:true,name: "Ray", description: "Rs" },
{ value:true,name: "Justice", description: "Js" },
{ value:true,name: "RR", description: "ESW" },
{ value:true,name: "Gop", description: "Gp" },
{ value:true,name: "DS", description: "JN" },
{ value:true,name: "Raven", description: "Rv" },
{ value:true,name: "FD", description: "FDGH" },
{ value:true,name: "Andrew", description: "Ar" },
{ value:true,name: "DDD", description: "GFG" },
{ value:true,name: "Shayne", description: "S" },
{ value:true,name: "YYY", description: "GHFGH" },
{ value:true,name: "Walter", description: "W" },
{ value:true,name: "EEE", description: "LUIO" },
{ value:true,name: "ZKZG", description: "RD" },
{ value:true,name: "JJJ", description: "FGJHGH" }];
$(document).ready(function () {
$('#triggerParameterData').kendoGrid({
columns: [{ field: "name" },
{ field: "value", template: '<input type="checkbox" value="#: value #">' },
{ field: "description" }],
selectable: "multiple,row",
pageable: false,
scrollable: false,
editable: true,
dataSource: {
data: popup, schema: {
model: {
fields: {
name: { editable: false },
value: { editable: false },
description: { editable: false },
}
}
}
},
})
});