Hi guys,
I need some help solving a pagination problem I have with my grid in a Razor page.
I using 2 Kendo Grids in a Razor page. Second grid (child grid) is a detail grid populated when user expends rows on the parent grid.
Pagination on the child grid seems not working. It always returns first page. Doing some debugging I observed that even if the page is sent correctly as a string parameter (...&page=3&...) it doesn't get into request.Page property (this is always 1). Please see my UI code below and the screenshots of the my debugging attached.
Thanks,
Mihai
<script id="template_table" type="text/kendo-tmpl">
@(Html.Kendo().Grid<TargetTableViewModel>()
.Name("grid_target_#=TargetId#")
.Columns(columns =>
{
columns.Bound(t => t.TableId).Title("ID").Width(100);
columns.Bound(t => t.TableName);
columns.Command(command => command.Destroy()).Width(150);
})
.ClientDetailTemplateId("template_field")
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(25)
.Model(model => model.Id(t => t.TableId))
.Read(read => read.Action("Targets", "MappingPages", new { handler = "TargetTables", targetId = "#=TargetId#" }).Type(HttpVerbs.Get))
.Destroy(delete => delete.Action("Targets", "MappingPages", new { handler = "DeleteTargetTable" }).Data("sendAntiForgery").Type(HttpVerbs.Post))
.Events(events => events.RequestEnd("onRequestEnd('#=TargetId#')"))
.ServerOperation(true)
)
.Pageable(pageable => pageable.ButtonCount(5))
.Sortable()
.ToClientTemplate())
</script>