This question is locked. New answers and comments are not allowed.
Hi all,
I found many posts here and there about this error, but none seemed to fit my scenario.
My grid is fairly simple, almost like the one form the sample app. I renamed my columns and added a column template to display "Edit" and "Details" links, and having to add a "Render()" action.
Now anytime a want to use AJAX (filtering, paging, refreshing), I get an "Error! The requested URL returned 500 - error"
Further investigation with FireBug tells me that the server returnd this:
and so on...
I am totaly lost. I suspect the added "render()" action to mess things up..
This is my view:
This is my controller:
I found many posts here and there about this error, but none seemed to fit my scenario.
My grid is fairly simple, almost like the one form the sample app. I renamed my columns and added a column template to display "Edit" and "Details" links, and having to add a "Render()" action.
Now anytime a want to use AJAX (filtering, paging, refreshing), I get an "Error! The requested URL returned 500 - error"
Further investigation with FireBug tells me that the server returnd this:
The partial view '_Index' was not found. The following locations were searched:~/Views/InternalProposal/_Index.aspx~/Views/InternalProposal/_Index.ascx~/Views/Shared/_Index.aspx~/Views/Shared/_Index.ascxI am totaly lost. I suspect the added "render()" action to mess things up..
This is my view:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2> Internal Proposal</h2> <% if (Model.Count() == 0) {%> DB empty <% } else {%> <% Html.Telerik().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(o => o.caseID).Title("#Case").Width(80); columns.Bound(o => o.status).Title("Status"); columns.Bound(o => o.id_agree).Title("#Agree"); columns.Bound(o => o.date_reg).Format("{0:dd/MM/yyyy}").Width(80).Title("Registration Date"); columns.Bound(o => o.car_vin_no).Width(160).Title("VIN"); columns.Bound(o => o.date_reply).Format("{0:dd/MM/yyyy}").Width(80).Title("Reply date"); columns.Bound(o => o.user_reply).Title("User Reply"); columns.Template(o => {%> <%=Html.ActionLink("Edit", "Edit", new {id = o.id_main})%> | <%=Html.ActionLink("Details", "Details", new {id = o.id_main})%> <%}) .ClientTemplate("<a href='" + Url.Action("Edit", "InternalProposal") + "/<# id_main #>Edit</a>" + " | <a href='" + Url.Action("Details", "InternalProposal") + "/<# id_main #>Details</a>").Title( "").Width(100); }) .DataBinding(dataBinding => { dataBinding.Server().Select("Index", "InternalProposal", new { ajax = ViewData["ajax"] }); dataBinding.Ajax().Select("_Index", "InternalProposal").Enabled((bool)ViewData["ajax"]); }) .Scrollable(scrolling => scrolling.Enabled((bool)ViewData["scrolling"])) .Sortable(sorting => sorting.Enabled((bool)ViewData["sorting"])) .Pageable(paging => paging.Enabled((bool)ViewData["paging"])) .Filterable(filtering => filtering.Enabled((bool)ViewData["filtering"])) .Groupable(grouping => grouping.Enabled((bool)ViewData["grouping"])) .Footer((bool)ViewData["showFooter"]) .Render();%> <%}%> <br /> <p> <%: Html.ActionLink("Add Proposal", "Create") %> </p></asp:Content>This is my controller:
public ActionResult Index(bool? ajax, bool? scrolling, bool? paging, bool? filtering, bool? sorting, bool? grouping, bool? showFooter){ ViewData["ajax"] = ajax ?? true; ViewData["scrolling"] = scrolling ?? true; ViewData["paging"] = paging ?? true; ViewData["filtering"] = filtering ?? true; ViewData["grouping"] = grouping ?? true; ViewData["sorting"] = sorting ?? true; ViewData["showFooter"] = showFooter ?? true; var viewModel = new InternalProposalHeader[] { }; viewModel = GetIntenalProposalHeaders(providerID); //ProviderID - from session info return View(viewModel);}//Action for Telerik Grid AJAX[GridAction]public ActionResult _Index(){ var viewModel = new InternalProposalHeader[] { }; viewModel = GetIntenalProposalHeaders(providerID); //ProviderID - from session info return PartialView(viewModel);}