Having the following code (stripped down version):
I do experience the following (wrong) behavior:
@using (Html.BeginForm(@"Store", @"Admin", FormMethod.Post)){ @(Html.Kendo().Grid((IEnumerable<MyModel>) ViewBag.MyItems) .Name(@"grid") .Columns(columns => { columns.Bound(pg => pg.Id).Visible(false); columns.Bound(pg => pg.Name).Template(
c => Html.ActionLink(c.Name, @"Details", new {id = c.Id})); columns.Command(
commands => commands.Destroy().Text("Delete")).Title("Delete"); }) .Pageable() .Sortable() .DataSource( dataSource => dataSource .Server() .Model(model => model.Id(p => p.Id)) .Destroy(d => d.Action(@"Item_Destroy", @"Admin"))) )}- User clicks the "Delete" button.
- The "Store" action of the "BeginForm" is being called, instead of the "Item_Destroy" action.
My question:
What have I done wrong in my view?
What have I done wrong in my view?