This question is locked. New answers and comments are not allowed.
Hi All,
I have a couple of issues trying to use the Grid Contriol.
Basically against each line I require an Edit and Delete button. When the user presses the Edit button I do not want to perform any of the functions given in the telerik example. I instead want to force control back to the controller and then open a new view. Also it places the buttons in the first line underneath each other and all otherlines with buttons side by side ??:
In my controller I just have stubs at the moment to prove that the post happens on each of the button clicks which it doesn't.
I have a couple of issues trying to use the Grid Contriol.
Basically against each line I require an Edit and Delete button. When the user presses the Edit button I do not want to perform any of the functions given in the telerik example. I instead want to force control back to the controller and then open a new view. Also it places the buttons in the first line underneath each other and all otherlines with buttons side by side ??:
@(Html.Telerik().Grid(Model.Sections) .Name("policyZoneGrid") .Sortable() .DataKeys(keys => keys.Add(r => r.SectionID)) .DataBinding(dataBinding => dataBinding.Ajax() .Update("SaveAjaxEditing","PolicyZoneController") .Delete("DeleteAjaxEditing", "PolicyZoneController") ) .Columns(columns => { columns.Command(commands => { commands.Edit(); commands.Delete(); }).Width(50).Title("Commands"); columns.Bound(r => r.Name).Width(10); columns.Bound(r => r.UIDisplayName).Width(10); }) .Groupable(grouping => grouping.Groups(groups => { groups.Add(r => r.UIDisplayName); })) .Sortable(sorting => sorting.OrderBy(sortOrder => sortOrder.Add(o => o.UIOrder).Descending())) .Pageable() )In my controller I just have stubs at the moment to prove that the post happens on each of the button clicks which it doesn't.
[AcceptVerbs(HttpVerbs.Post)] [Telerik.Web.Mvc.GridAction] public ActionResult SaveAjaxEditing() { return View(); } [AcceptVerbs(HttpVerbs.Post)] [Telerik.Web.Mvc.GridAction] public ActionResult DeleteAjaxEditing() { return View(); }