I've got a view with a Html.TelerikReporting().ReportViewer() mvc helper.
in a partial view I load a Html.Kendo().Grid<FFDashboardWeb.Models.PDocDashboardGridViewModel>()
if I enable any paging features on the grid, I get javascript errors when it executes the datasource read event . The javascript is breaking in the =report viewer= javascript file! It's like the report viewer is intercepting the datasource callback?
If I remove the report viewer from the page, the grid works fine.
@(Html.Kendo().Grid<FFDashboardWeb.Models.PDocDashboardGridViewModel>()
.Name("documentDetail")
.Columns(columns =>
{
columns.Bound(m => m.Id).Hidden().Title("Date Scanned").Width(150).Format("{0:d}");
columns.Bound(m => m.TransactionDate).Title("Date Scanned").Width(150).Format("{0:d}");
columns.Bound(m => m.Result).Title("Result").Width(150);
columns.Bound(m => m.DocumentClassName).Title("Document").Width(400);
columns.Bound(m => m.IssuingStateName).Title("State").Width(150);
columns.Bound(m => m.AlertsJoined).Title("Alerts");
})
.Pageable()
.Sortable(sortable =>
{
sortable.SortMode(GridSortMode.SingleColumn);
})
.Scrollable(s => s.Height("auto"))
.DataSource(ds => ds
.Ajax()
.Batch(false)
.PageSize(20)
.ServerOperation(true)
.Model(model => model.Id("Id"))
.Read(read => read.Action("kgrdDashboardDetails_read", "Home").Data("includeDetailParameters"))
)
)
These are in the _Layout
<script src="https://kendo.cdn.telerik.com/2019.1.115/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.1.115/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.1.115/js/kendo.aspnetmvc.min.js"></script>
These are in the specific page where the report viewer is needed
<script src="@Url.Content("~/ReportViewer/js/telerikReportViewer.kendo-13.0.19.116.min.js")"></script>
<script src="@Url.Content("~/ReportViewer/js/telerikReportViewer-13.0.19.116.min.js")"></script>
@(Html.TelerikReporting().ReportViewer()
.Id("rvResultDistViewer")
.ServiceUrl(Url.Content("~/api/reports"))
.ReportSource(rsrcResultDist)
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.FitPage)
.PersistSession(false)
.PrintMode(PrintMode.AutoSelect)
.SendEmail(new SendEmail { Enabled = false })
.EnableAccessibility(false)
.PageMode(PageMode.SinglePage)
.ClientEvents(e =>
{
{
e.Ready("handleViewerReady_main");
e.PageReady("handlePageReady_main");
e.InteractiveActionExecuting("handleResultClick");
}
})
)