This is for ASP.NET MVC
I have a grid that on scrolling hits the controller and does true sql paging. So each time you scroll it hits the controller that calls sql and gets the next 100 rows of data. This was working fine until we upgraded from a 2019 version of Kendo to the 2024.1.130.545 version. It all still works but as you scroll it gets slower and slower with each group of 100, the sql calls are all still fast but loading the data on the screen slows down exponentially on each set of 100.
This is the grid code we have set.
.NoRecords(x => x.Template("<div class='empty-grid' style='height: 300px; padding-top: 50px'>There are no units that match your search criteria. <br /><br /> Please expand your search criteria and try again.</div>"))
.Sortable(sortable => sortable.Enabled(true).SortMode(GridSortMode.SingleColumn))
.ColumnMenu()
.Resizable(resize => resize.Columns(true))
.Filterable(filterable => filterable
.Mode(GridFilterMode.Row)
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.Contains("Contains")
.StartsWith("Starts with")
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
.DoesNotContain("Does Not Contain")
.EndsWith("Ends WIth")
.IsEmpty("Is Empty")
))
)
.Reorderable(reorder => reorder.Columns(true))
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Single))
.Scrollable(scrollable => scrollable.Endless(false).Height(600))
.ToolBar(tools => tools.Excel())
.Excel(excel => excel
.FileName("UnitSearchExport.xlsx")
.Filterable(true)
.AllPages(true)
.ProxyURL(Url.Action("Excel_Export_Save", "Functions"))
)
.DataSource(dataSource => dataSource
.Ajax()
.AutoSync(false)
.ServerOperation(false)
.Model(model =>
{
var Modelinfo = new Infinity.Vehicle.Inventory.Vehicles_Listing.VehicleListInfo();
var Stock_Number = Modelinfo.Stock_Number;
model.Id(p => Stock_Number);
}))
.Events(e => e
.Filter("UnitInventoryListInfiniteScrollGrid_OnFiltering")
.Sort("UnitInventoryListInfiniteScrollGrid_OnSorting")
.ExcelExport("UnitInventoryListInfiniteScrollGrid_OnExcelExport")
.DataBound("UnitInventoryListInfiniteScrollGrid_OnDataBound")
))
Then on Scroll it basically does this.
data: [
response.Listing
]
});
unitListingGrid.dataSource.data().push.apply(unitListingGrid.dataSource.data(), dataSourceUnitListing.options.data[0]);
amountOfUnitsShownOnGrid = unitListingGrid.dataSource.view().length;