禁用单元格编辑:
var len = $("#gridName").find("tbody tr").length;
for(var i=0;i<=len ; i++)
{
var model = $("#gridName").data("kendoGrid").dataSource.at(i);
if (model) {//field names
model.fields["DueDateStr"].editable = false;
model.fields["TotalAmount"].editable = false;
model.fields["IsPercentage"].editable = false;
}
}
禁用它在模板中的复选框控件:
$.map($("#gridName").find("input:checkbox"),
function (item) {
$(item).attr('disabled', 'disabled');
}
);
删除命令按钮,如删除按钮:
var rows = $('#gridName tbody tr');
$.map(rows, function (row) {
//cell buttons index
row.cells[4].innerHTML = "";
});
隐藏工具栏网格:
$("#gridName .k-grid-toolbar").hide();