相关疑难解决方法(0)

剑道网格隐藏/显示删除按钮

我是Kendo MVC组件以及jQuery的新手.

我正在构建Kendo Grid.我想在Kendo网格上的页面加载时隐藏destroy(删除)命令.之后当我点击同一页面上的按钮时,它应该是可见的.

剑道网格:

@(Html.Kendo().Grid<Model>() 
.Name("grid")
.Columns(columns =>
{
columns.Bound(product => product.DESCRIPTION).Title("Description");
columns.Bound(product => product.CODE).Title("Description");
columns.Command(commands =>
{
commands.Destroy().HtmlAttributes(new { id = "buttondelete" }); 
}).Title("Operations");
 })
.ToolBar(toolbar =>
{
toolbar.Create().Text("Add Records"); 
toolbar.Save(); 
})

.Editable(editable => editable.Mode(GridEditMode.InCell)) 
.Pageable(pager => pager
.PageSizes(true)
.Input(true)
.Refresh(true)
)
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(true)
.Events(events => events.Error("onError"))
.Model(model =>
{
 model.Id(product => product.ID); // Specify the property which is the unique identifier of the model
model.Field(p => p.DESCRIPTION).Editable(false);
model.Field(product => product.CODE).Editable(false);
})
.Create(create => create.Action("a", …
Run Code Online (Sandbox Code Playgroud)

javascript asp.net-mvc jquery kendo-ui kendo-grid

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

asp.net-mvc ×1

javascript ×1

jquery ×1

kendo-grid ×1

kendo-ui ×1