Hi,
I have a problem while loading data to a grid. I want to disable Pagination and show all data on one page.
@(Html.Kendo().Grid<WasteGridViewModel>() .Name("gridAllWaste") .Columns(columns => { columns.Bound(c => c.LocationCode).Title(@Helpers.Localize("gridLabel_locationCode").ToString()); columns.Bound(c => c.Timestamp).Format("{0:dd-MM-yyyy}").Title(@Helpers.Localize("gridLabel_timestamp").ToString()); columns.Bound(c => c.Value).Title(@Helpers.Localize("gridLabel_value").ToString()); if (User.Identity.IsInRole(UserRole.EditWaste)) { columns.Command(command => { command.Edit().Text(@Helpers.Localize("edit").ToString()); if (User.Identity.IsInRole(UserRole.AllAccess)) { command.Custom(@Helpers.Localize("delete").ToString()).Click("openWindow"); } }).Width(250); } }) .ToolBar(toolbar => { if (User.Identity.IsInRole(UserRole.EditWaste)) { toolbar.Create().Text(@Helpers.Localize("wasteGrid_add").ToString()); } }) .Scrollable(s => s.Height("auto")) .Groupable() .Sortable() .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("WasteEdit").DisplayDeleteConfirmation(false)) .Filterable(ftb => ftb.Mode(GridFilterMode.Row)) .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .DataSource(dataSource => dataSource .Ajax() .PageSize(50) .Events(events => { events.Error("errorHandler"); events.RequestEnd("onRequestEnd"); }) .Model(model => model.Id(p => p.WasteId)) .Read(read => read.Action("GetAllWaste", "Waste")) .Create(update => update.Action("CreateWaste", "Waste")) .Update(update => update.Action("UpdateWaste", "Waste")) .Destroy(update => update.Action("DeleteWaste", "Waste")) ))
Above code works fine, but when I remove Pageable and change PageSize to bigger number, for example 6000 grid doesn't show any data. I get respone 302 on my request:
Request URL:http://localhost:29786/Waste/GetAllWasteRequest Method:POSTStatus Code:302 FoundRemote Address:[::1]:29786Referrer Policy:no-referrer-when-downgradeRepose Headers:Cache-Control:private, s-maxage=0Content-Length:157Content-Type:application/json; charset=utf-8Date:Tue, 20 Jun 2017 09:04:53 GMTLocation:/Error/?aspxerrorpath=/Waste/GetAllWasteServer:Microsoft-IIS/10.0X-AspNet-Version:4.0.30319X-AspNetMvc-Version:5.2X-Powered-By:ASP.NETX-SourceFiles:=?UTF-8?B?QzpcUmVwb3NpdG9yaWVzXFdhc3RlXHNyY1xFbmdpZS5XYXN0ZVxFbmdpZS5XYXN0ZVxXYXN0ZVxHZXRBbGxXYXN0ZQ==?=
Thanks in advance for any help.
