【发布时间】:2015-09-23 14:24:59
【问题描述】:
我有这个网格
$("#LocationGrid").kendoGrid({
dataSource: locationDataSource,
editable: "inline",
columns: [ { field: "LocationID", hidden: "hidden" },
{ field: "LocationName", title: "Location Name" },
{ command: [{ name: "edit" }] }]
});
如果用户有权限,我想在此网格中添加带有创建按钮的工具栏
if(condition) //user has permission
{
//add toolbar to grid
toolbar: [{ name: "create", text: "Add New Location}],
}
如果用户有权限,还可以在命令列中添加“删除”按钮
if(condition) //user has permission
{
//add delete button to grid
command: [{ name: "delete"}]
}
请问我该怎么做?
【问题讨论】:
-
嗨。你找到解决办法了吗?
标签: telerik kendo-grid