我在KendoUI首发,我写这篇文章的代码此网格我已经删除和编辑命令来创建网格如何加载视图弹出编辑剑道电网
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Id).Groupable(false).Visible(false);
columns.Bound(p => p.BrandName);
columns.Bound(p => p.BrandAbbr);
columns.Bound(p => p.SrcImage);
columns.Bound(item => @item.Id).Title("Command").Filterable(false).Groupable(false)
.Template(@<text>
@Html.ActionLink("Edit", "Edit", new {id = @item.Id}, new {@class = "k-button k-button-icontext k-grid-Edit"})
@Html.ActionLink("Delete", "Delete", new {id = @item.Id}, new {@class = "k-button k-button-icontext k-grid-Delete"})
</text>).Width(200);
});
})
.ToolBar(toolbar =>
{
toolbar.Custom().Action("Create","Brand").Text("add");
}
)
.Groupable()
.Pageable()
.Sortable()
.Scrollable()
.Filterable()
.HtmlAttributes(new {style = "height:500px;"})
.DataSource(dataSource => dataSource
.Server()
.Model(model => model.Id(item => item.Id))
))
。我想当用户点击编辑按钮到网格视图编辑显示弹出窗体。但我不知道该怎么做。请帮帮我。谢谢大家。
@ Paritosh:谢谢你的帮助me.but此代码当用户点击编辑按钮显示编辑表单弹出,但我想加载编辑视图弹出和用户可以更新数据和保存。谢谢你的帮助。 – Pouya