如何隐藏kendo 网格命令编辑按钮或删除按钮?

How to hide kendo grid command edit button or delete button?

我想根据角色隐藏kendo 网格命令编辑按钮或删除按钮。 + 如果needed.Thanks

如何隐藏命令列
 { command: [{ name: "Details", click: showDetails },
             { name: "Edit", click: onEdit },
             { name: "Delete", click: obDelete, hidden:true}], title: 'Actions', width: 230 }

以防万一,如果有人需要答案(参考:http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.command.visible

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
  columns: [
    { field: "name" },
    { command: [{ name: "edit", visible: function(dataItem) { return 
dataItem.name==="Jane" } }] }
  ],
  editable: "popup",
  dataSource: [ { name: "Jane" }, { name: "Bill" } ]
});
</script>