columns.editable Function
The JavaScript function that is executed when the cell or row is about to be opened for editing. The returned result will determine whether an editor for the column will be created.
Example - conditionally editing a cell
<div id="treelist"></div>
<script>
$("#treelist").kendoTreeList({
columns: [
{
field: "lastName",
title: "Last Name",
editable: function(dataItem) {
return dataItem.lastName !== "Jackson";
}
},
{ field: "position", title: "Position", },
{ title: "Edit", command: ["edit"], width: 250 }
],
editable: true,
dataSource: [
{ id: 1, parentId: null, lastName: "Jackson", position: "CEO" },
{ id: 2, parentId: 1, lastName: "Weber", position: "VP, Engineering" }
]
});
</script>