This question is locked. New answers and comments are not allowed.
I have a grid that load via ajax and everything works fine. When I add the Delete Command the grid causes the following javascript error. I have tried to remove all code except the Grid and I get the same error? Any suggestions as to what I'm doing wrong. I have AJAX Gridss working in another project just fine.
Controller
<% Html.Telerik().Grid(Model.ZonesGridDisplay) .Name("gridLocationTypes") .DataKeys(keys => { keys.Add(m => m.ZoneId); }) .HtmlAttributes(new { style = string.Format("margin-top:10px;display:none;") }) .DataBinding(dataBinding => { dataBinding.Ajax() .Select("_SelectZones", "Zone") .Delete("_DeleteZones", "Zone"); }) .Columns(columns => { columns.Bound(m => m.MarketName).Width(180); columns.Bound(m => m.ZoneName).Width(180); columns.Bound(m => m.ParentZoneName).Width(180); columns.Bound(m => m.ModifiedDate).Width(180).ReadOnly(); columns.Bound(m => m.ModifiedBy).Width(180).ReadOnly(); columns.Command(commands => { commands.Delete(); }).Width(180).Title("Commands"); }) .Groupable(grouping => grouping .Groups(groups => { groups.Add(m => m.MarketName); })) .Pageable() .Sortable() .Filterable() .Selectable() .ClientEvents(events => events.OnRowDataBound("gridLocationTypes_onRowDataBound")) .Render(); %>Controller
[GridAction] public ActionResult _SelectZones() { //ZonesViewData viewData = ViewDataFactory.CreateBaseViewData<ZonesViewData>("Zone Setup"); List<ZonesGridDisplay> zones = ZoneService.GetZonesForGridDisplay(null); return View(new GridModel(zones)); } [GridAction] public ActionResult _DeleteZones(Guid id) { Zone zone = ZoneService.GetById(id); if (zone != null) { ZoneService.Delete(zone); } return View(new GridModel(ZoneService.GetZonesForGridDisplay(null))); }