This question is locked. New answers and comments are not allowed.
Hello all,
I'm very new to Telerik controls, so I'm probably missing something very obvious.
I have followed the instructions to get a grid editable, but using server binding, the actions defined for Edit and Delete do not fire. The controller action that renders the grid is the only thing that fires.
I have put breakpoints in the grid methods but there is no indication they fire and data is not updated.
Here is my View:
Controller Actions:
What am I missing from making these actions fire?
Thanks,
R
I'm very new to Telerik controls, so I'm probably missing something very obvious.
I have followed the instructions to get a grid editable, but using server binding, the actions defined for Edit and Delete do not fire. The controller action that renders the grid is the only thing that fires.
I have put breakpoints in the grid methods but there is no indication they fire and data is not updated.
Here is my View:
<% Html.Telerik().Grid(Model.MyList).Name("Grid1").DataKeys(keys => keys.Add(c => c.myId)) .DataBinding(dataBinding => dataBinding .Server() .Enabled(true) .Delete("Delete", "Home") .Update("Update", "Home")) .Columns(columns => { columns.Bound(o => o.myId).Width(1).ReadOnly(); columns.Bound(o => o.PartnerSegmentName).Width(5); columns.Command(commands => { commands.Edit().ButtonType(GridButtonType.Image); commands.Delete().ButtonType(GridButtonType.Image); }).Title("Commands"); }) .Sortable() .Editable(e => e.Enabled(true)) .Render();%>Controller Actions:
[HttpPost]public ActionResult Delete(string id){ throw new NotImplementedException();}[HttpPost]public ActionResult Update(string segid){ // Get data to edit into editedmap if (TryUpdateModel(editedmap)) { // update my stuff } return RedirectToAction("Home", this.GridRouteValues());}What am I missing from making these actions fire?
Thanks,
R