Grid paging not working

3 posts, 0 answers
  1. Allan
    Allan avatar
    34 posts
    Member since:
    Aug 2015

    Posted 11 Nov 2015 Link to this post

    I'm having a problem with my grid.  The paging is not working when the datasource options are used.

    My code is as follows:

     

    @(Html.Kendo().Grid(Model)
          .Name("Grid")
          .Columns(columns =>
            {
              columns.Bound(c => c.status).Title("Status")
            }
          )

                .Pageable()
          .DataSource(dataSource => dataSource
              .Ajax()
              .PageSize(30)
              .Filter(filters =>
                  {
                      filters.Add(status => status.requirementstatus).Contains("2");
                  }
              )
          )
    )

     

    If I remove dtaousrce completely all the results are returned and the grid pages perfectly.  What am I doing wrong?

  2. Allan
    Allan avatar
    34 posts
    Member since:
    Aug 2015

    Posted 11 Nov 2015 in reply to Allan Link to this post

    Just to expand on my original message if I change .Ajax() to .Server() the paging works.
    This is not the behaviour I want.  How can I change it?
  3. Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 12 Nov 2015 Link to this post

    Hi,

    It seems that you are trying to use Ajax calls while performing server binding. If you want to use Ajax for paging we recommend using the Ajax binding.

    Regards,
    Plamen
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top