Last Updated: 21 Jan 2020 15:41 by ADMIN
Created on: 19 Oct 2016 20:22
Category: Grid
Type: Feature Request
Add Page Number to the ASP.NET MVC Grid Helper
In you web site we used the Html.Kendo().Grid Helper to build our code for the grid.
When a user refresh the page we want to keep the context of the grid, meaning the same page size the same sort and the same page number.

When we build the grind using Html.Kendo().Grid Helper the only option that we can not set is the Page number (the page that is being display).

I see that using the javascript we can set the page

var dataSource = new kendo.data.DataSource({
  data: [
    { name: "Tea", category: "Beverages" },
    { name: "Coffee", category: "Beverages" },
    { name: "Ham", category: "Food" }
  // set the second page as the current page
  page: 2,
  pageSize: 2
  var view = dataSource.view();
  console.log(view.length); // displays "1"
  console.log(view[0].name); // displays "Ham"

But why this option is not available using the MVC Helper

.DataSource(dataSource => dataSource 
.ServerOperation(true) // Paging, sorting, filtering and grouping will be done client-side 
.Read(read => read.Url("/results/gethomes")) 

This will be a nice feature to have.