This question is locked. New answers and comments are not allowed.
As a result of this code, the Delete Button is rendered with the wrong action, namely the Index Action (which is the action of the View) plus an ID, which makes not sense whatsoever (Index has no id).
See attachment for the rendered button.
See attachment for the rendered button.
| Html.Telerik().Grid<WorkitemTableRowPattern>() |
| .BindTo(Model.rows) |
| .Name("WorkitemGrid") |
| .Localizable("de-DE") //ToDo Culture allgemein ersetzen |
| //.ToolBar(tb => { |
| // tb.Insert(); |
| //}) |
| .DataBinding(b => b.Ajax() |
| .Select<WorkitemController>(sc => sc.AjaxGridSelect(Model.fatherKey)) |
| .Delete<WorkitemController>(sc => sc.AjaxGridDelete(String.Empty)) // Parameter is added by Grid engine |
| .Insert<WorkitemController>(sc => sc.AjaxGridInsert()) |
| .Update<WorkitemController>(sc => sc.AjaxGridUpdate(String.Empty)) // Parameter is added by Grid engine |
| ) |
| .DataKeys(k => k.Add(r => r.workitem.RowKey)) |
| .Columns(c => |
| { |
| c.Command(s => |
| { |
| // s.Select(); |
| //s.Edit(); |
| s.Delete(); |
| }).Width(300); |
| c.Bound(r => r.workitem.Title); |
| if (Model.viewSprints) c.Bound(s => s.SprintTitle); |
| c.Bound(r => r.workitem.RemainingDays).Format("{0}").Width(15).Title("Rem. Days"); |
| c.Bound(r => r.workitem.RemainingHours).Format("{0}").Width(15).Title("Rem. Hours"); |
| c.Bound(r => r.workitem.FreeRemainingDays).Format("{0}").ReadOnly(true).Width(15).Title("Free Rem. Days"); |
| c.Bound(r => r.workitem.FreeRemainingHours).Format("{0}").ReadOnly(true).Width(15).Title("Free Rem. Hours"); |
| c.Bound(r => r.workitem.Urgent); |
| c.Bound(r => r.workitem.Important); |
| c.Bound(r => r.workitem.Status); |
| }) |
| .Sortable() |
| .Pageable() |
| .Groupable() |
| .Filterable() |
| .Render(); |