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

DataSource pagesize not working

2 Answers 245 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yasmine
Top achievements
Rank 1
Yasmine asked on 22 Oct 2015, 08:25 PM

When putting the grid together, running my solution in IIS express works great, however when it runs on full IIS 8, the grid returns all 23k rows of data, rather than the 25 i specified in the pagesize.  Dubugging the code shows the DataSourceRequest object has 0 for the page size.  Again, this is for initial page load and even if i filter.  Thoughts?

 

Html.Kendo().Grid<TaxEx.Entities.ViewEffectiveCompanyTax>().Name("grid")
.Columns(c =>
{
c.Bound(p => p.Id);
c.Bound(p => p.EffectiveDate);
c.Bound(p => p.AppCompanyNameId);
})
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(25)
.Read(read => read.Action("GetData", "Company")))
.Scrollable(scrollable => scrollable.Height(600))
.Pageable()

 

CONTROLLER CODE:

public ActionResult GetData([DataSourceRequest]DataSourceRequest request)
{
using (TaxExEntities entity = new TaxExEntities())
{
IQueryable<ViewEffectiveCompanyTax> details = entity.ViewEffectiveCompanyTaxes;

DataSourceResult result = details.ToDataSourceResult(request, x => x);

return Json(result2);
}

}

2 Answers, 1 is accepted

Sort by
0
Yasmine
Top achievements
Rank 1
answered on 22 Oct 2015, 08:55 PM
We also have a test environment that is running IIS 7.5, and it works just fine.  So IIS Express and IIS 7.5 are good, IIS8 is not.  very odd.
0
Rosen
Telerik team
answered on 27 Oct 2015, 06:41 AM

Hello Yasmine,

 

We are not aware of such issue. Please verify that all of the script files are correctly referenced and loaded as well as that the application and server is configured correctly(identical with those which does not expose the behavior in question). Also you should check that there are no errors on the page.

 

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Yasmine
Top achievements
Rank 1
Answers by
Yasmine
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or