This question is locked. New answers and comments are not allowed.
This code leads to a null pointer exception.
It works, if I comment the row s.Edit() and it does not work, if I uncomment the row.
It works, if I comment the row s.Edit() and it does not work, if I uncomment the row.
| 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(); |