gpt4 book ai didi

javascript - 如何隐藏剑道网格命令编辑按钮或删除按钮?

转载 作者:行者123 更新时间:2023-11-29 19:29:34 25 4
gpt4 key购买 nike

我想根据 Angular 色隐藏剑道网格命令编辑按钮或删除按钮。+ 如果需要如何隐藏命令列。谢谢

 { 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>

关于javascript - 如何隐藏剑道网格命令编辑按钮或删除按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28727678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com