Kendo ui 如何在剑道网格中启用单列编辑
我只想为以下代码的地址字段启用编辑:Kendo ui 如何在剑道网格中启用单列编辑,kendo-ui,Kendo Ui,我只想为以下代码的地址字段启用编辑: $(“#网格”).kendoGrid({ 栏目:[{ 字段:“name”,//创建绑定到“name”字段的列 标题:“名称”//将其标题设置为“名称” }, { field: "age",// create a column bound to the "age" field title: "Age" ,// set its title to "Age" },
$(“#网格”).kendoGrid({ 栏目:[{ 字段:“name”,//创建绑定到“name”字段的列 标题:“名称”//将其标题设置为“名称”
},
{
field: "age",// create a column bound to the "age" field
title: "Age" ,// set its title to "Age"
},
{
field: "doj",
title: "DOJ",
},
{
field: "address",
title: "ADDRESS",
},
{ command: [{ name: "destroy", text: "Remove" }, { name: "edit", text: "edit" }] }],
editable: "popup",
sortable:true,
dataSource: [{ name: "Jane", age: 30, address: "Bangalore", }, { name: "John", age: 33, address: "Hyderabad" }]
});
必须将“可编辑:false”设置为列
model: {
fields: {
ProductID: {
editable: false
}
}
}
对数据库架构的列定义可编辑:false&null:true
dataSource = new kendo.data.DataSource({
..
schema: {
model: {
id: "YourID",
fields: {
YourID: { editable: false, nullable: true },
address: { editable: false, nullable: true },
..
..
}
}
}
..
})