This question is locked. New answers and comments are not allowed.
am not able to make Ajax calls to update the database via the Grid or insert. I have pretty much followed all instructions
<% Html.Telerik().Grid(Model) .Name("Company") .DataKeys(keys => keys.Add(c => c.ID)) .ToolBar(commands => { if (User.IsInRole("Admin")) commands.Insert().ButtonType(GridButtonType.Text).ImageHtmlAttributes(new { style = "margin-left:0;", title = "Add New Company" }); }) .DataBinding(dataBinding => dataBinding.() .Select("Index", "Test") .Insert("Insert", "Test", new { mode = GridEditMode.InLine, type = GridButtonType.ImageAndText }) .Update("Save", "Test", new { mode = GridEditMode.InLine, type = GridButtonType.ImageAndText }) .Delete("Delete", "Test", new { mode = GridEditMode.InLine, type = GridButtonType.ImageAndText })) .Columns(columns => { columns.Bound(p => p.CompanyName).Width(190); columns.Bound(p => p.Industry).Width(90).Width(230); columns.Bound(p => p.Subsector).Width(230); columns.Bound(p => p.Firm).Width(90).Width(230); columns.Bound(p => p.Address).Width(130); columns.Bound(p => p.City).Width(130); columns.Bound(p => p.Country).Width(130); columns.Bound(p => p.PostalCode).Width(130); columns.Bound(p => p.Phone).Width(130); columns.Bound(p => p.Fax).Width(130); columns.Command(commands => { if (User.IsInRole("Admin")) commands.Edit().ButtonType(GridButtonType.ImageAndText); if (User.IsInRole("Admin")) commands.Delete().ButtonType(GridButtonType.ImageAndText); commands.Select().ButtonType(GridButtonType.ImageAndText); }).HtmlAttributes(new { nowrap = "nowrap", style = "white-space:nowrap !important;" }).Width(300); } ) .Editable(editing => editing.Mode(GridEditMode.InLine)) .Sortable() .Pageable() .Selectable() .Scrollable() .HtmlAttributes(new { style = "overflow-x:auto;overflow-y:hidden" }) .Render(); %> <%} %>My Controller Method for update functionality
public ActionResult Save(int id, int Industry, int SVBAIndustrySubsector, int LegalFirm, GridEditMode mode, GridButtonType type) { commonFunctions(); CompanyDetails companyDetails = CompanyModel.GetCompany(id); TryUpdateModel(companyDetails); IndustryType objIndustryType = (from i in CompanyModel.GetAllIndustries() where i.IndustryTypeID == Industry select i).FirstOrDefault(); SubSectorType objSubSectorType = (from s in CompanyModel.GetAllSubSector() where s.SubSectorTypeID == SVBAIndustrySubsector select s).FirstOrDefault(); LegalFirmType objLegalFirmType = (from l in CompanyModel.GetAllLegalFirm() where l.FirmID == LegalFirm select l).FirstOrDefault(); companyDetails.Industry = objIndustryType; companyDetails.SVBAIndustrySubsector = objSubSectorType; companyDetails.LegalFirm = objLegalFirmType; bool returnValue = CompanyModel.SaveCompany(companyDetails); PopulateSearchResults(companyDetails, false, true, false, 0); List<CompanyDetails> objCompanyDetails = GetSearchResult(Session["CompanyName"] as string, 0, 0); return View(new GridModel(objCompanyDetails)); }When i click on update buttonit hits Action in the controller and value will be updated in DB but in my view am getting following Error message . Please Help