This question is locked. New answers and comments are not allowed.
I have two grids on one page, using AJAX custom binding. I have action methods as follows:
The first grid works fine. The second grid which uses the second action method AdHocContacts for grid throws an error saying that it can't find the view
The view 'AdHocContactsForGrid' or its master was not found or no view engine supports the searched locations. The following locations were searched:
Second grid view:
Is there something special I need to do to get multiple ajax custom bound grids working ??
[Telerik.Web.Mvc.GridAction(EnableCustomBinding = true, GridName = "MailingMergesGrid")][Transaction]public ActionResult MailingMergesForGrid(Telerik.Web.Mvc.GridCommand command){ var rowCount = mailingMergeManagementService.GetMailingMergeSummariesCount(Id); IEnumerable<MailingMergeDto> mailingMerges = GetDataForGri(command, mailingMergeManagementService.GetMailingMergeSummaries); return View(new Telerik.Web.Mvc.GridModel { Data = mailingMerges, Total = rowCount.Value });}
and
[Telerik.Web.Mvc.GridAction(EnableCustomBinding = true, GridName = "MailingList.AdhocContacts")]
[Transaction]
public ActionResult AdHocContactsForGrid(Telerik.Web.Mvc.GridCommand command)
{
var rowCount = mailingMergeManagementService.GetMailingMergeSummariesCount(id);
IEnumerable<MailingListContactDto> mailingMerges = GetDataForGrid<MailingListContactDto>(command, mailingListContactManagementService.GetAllAddHocMailingContacts);
return View(new Telerik.Web.Mvc.GridModel
{
Data = mailingMerges,
Total = rowCount.Value
});
}
The first grid works fine. The second grid which uses the second action method AdHocContacts for grid throws an error saying that it can't find the view
The view 'AdHocContactsForGrid' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/AdHocContactsForGrid.aspx
~/AdHocContactsForGrid.ascx
~/Views/MailingMerges/AdHocContactsForGrid.aspx
~/Views/MailingMerges/AdHocContactsForGrid.ascx
~/Views/Shared/AdHocContactsForGrid.aspx
~/Views/Shared/AdHocContactsForGrid.ascx
Second grid view:
<% Html.Telerik().Grid<MailingListContactDto>() .Name("MailingList.AdhocContacts") .Columns(columns => { columns.Bound(p => p.FullName).HeaderHtmlAttributes(new { @class = "name-column" }); columns.Bound(p => p.Email).HeaderHtmlAttributes(new { @class = "email-column" }); }) .DataBinding(dataBinding => dataBinding.Ajax().Select("AdHocContactsForGrid", "MailingMerges")) .Pageable(settings => settings .Total((int)ViewData["total"])) .EnableCustomBinding(true) .Sortable(sorting => sorting .OrderBy(sortOrder => sortOrder.Add(p => p.FullName).Ascending())) .Render();%>Is there something special I need to do to get multiple ajax custom bound grids working ??