I am upgrading my application to Telerik UI for AspNet.Core v2021.2.616. I got the grid to display data, but the grid pager component shows 0 as the current page and the pager navigation controls are disabled
Here is the view
<text>
<kendo-grid name="usersGrid" on-data-bound="UserMaintenance.onDataBound" selectable="true">
<datasource type="DataSourceTagHelperType.Ajax" page-size="5"> <transport> <read url="@Url.Action("GetUsers", "User", new { Area = "Admin" })" type="post" /> </transport> <schema data="data"> </schema> </datasource> <columns> <column field="userId" title="User Id" width="1" visible="false" html-attributes='new Dictionary<string, object>{ ["class"] = "primary-key" }' /> <column field="userName" title="User Name" /> <column field="stateUserId" title="State User Identifier" /> <column field="email" title="Email" /> <column field="isActive" title="Active" template="#= isActive ? 'Yes' : 'No' #" width="100" /> <column title="Actions"> <commands> <column-command text="Edit" id="edit" name="edit" click="function(e){UserMaintenance.onOpenEditUserModal(e, 'UserId')}" /> <column-command text="Deactivate" id="deactivate" name="deactivate" click="function(e){UserMaintenance.onOpenDeleteUserModal(e, 'UserId')}" /> <column-command text="Activate" id="activate" name="activate" click="function(e){UserMaintenance.onOpenActivateUserModal(e, 'UserId')}" /> </commands> </column> </columns> <toolbar> <toolbar-button text="Add User" name="Add" template="UserMaintenance.userCustomTemplate" /> </toolbar> <scrollable enabled="true" /> <groupable enabled="true" /> <sortable enabled="true" /> <pageable enabled="true" responsive="false" button-count="5" refresh="true" page-sizes="new int[] { 5, 10, 20 }"></pageable> <filterable enabled="true" /> </kendo-grid>
</text>
Here is the controller method
<text>
public ActionResult GetUsers([DataSourceRequest] DataSourceRequest request, string userSearch) { var users = _uow.UserRepository.GetAll() .AsNoTracking() .OrderBy(u => u.UserName); var result = users.ToDataSourceResult(request); return Json(result); }
</text>
What am I missing? If this is not enough information, let me know what else you need to see
Thanks