This is a migrated thread and some comments may be shown as answers.

Grid paging not working

2 Answers 1238 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 1
Allan asked on 11 Nov 2015, 01:59 PM

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 Answers, 1 is accepted

Sort by
0
Allan
Top achievements
Rank 1
answered on 11 Nov 2015, 02:08 PM
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?
0
Plamen
Telerik team
answered on 12 Nov 2015, 07:23 AM
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
Tags
Grid
Asked by
Allan
Top achievements
Rank 1
Answers by
Allan
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or