admin管理员组文章数量:1325236
I want to hide kendo grid mand edit button or delete button based on role. + How to hide mand column if needed.Thanks
{ mand: [{ name: "Details", click: showDetails },
{ name: "Edit", click: onEdit },
{ name: "Delete", click: obDelete, hidden:true}], title: 'Actions', width: 230 }
I want to hide kendo grid mand edit button or delete button based on role. + How to hide mand column if needed.Thanks
{ mand: [{ name: "Details", click: showDetails },
{ name: "Edit", click: onEdit },
{ name: "Delete", click: obDelete, hidden:true}], title: 'Actions', width: 230 }
Share
Improve this question
asked Feb 25, 2015 at 19:15
IronmanIronman
2431 gold badge4 silver badges16 bronze badges
1 Answer
Reset to default 4Just in case, if someone needs an answer (Reference: http://docs.telerik./kendo-ui/api/javascript/ui/grid#configuration-columns.mand.visible)
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ mand: [{ name: "edit", visible: function(dataItem) { return
dataItem.name==="Jane" } }] }
],
editable: "popup",
dataSource: [ { name: "Jane" }, { name: "Bill" } ]
});
</script>
本文标签: javascriptHow to hide kendo grid command edit button or delete buttonStack Overflow
版权声明:本文标题:javascript - How to hide kendo grid command edit button or delete button? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742167005a2426011.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论