New to Kendo UI for jQuery? Download free 30-day trial

Set All Page Size in Grid for ASP.NET Core

Environment

Product Progress® Telerik® UI Grid for ASP.NET Core
Product Version 2017.2.621

Description

How can I use an All page size in the Kendo UI Grid in ASP.NET Core projects?

Solution

After the document is ready, dynamically add the option for the All page size through the dataSource of the DropdownList to allow for selecting the page size.

        $(function () {

            var grid = $('#grid').data('kendoGrid');
            var pageSizeDropDownList= grid.wrapper.find('.k-pager-sizes').find('[data-role="dropdownlist"]').data('kendoDropDownList');
            console.log(pageSizeDropDownList)
            pageSizeDropDownList.dataSource.add({text:"All", value:'all'})
            pageSizeDropDownList.dataSource.sync()      
        })

Notes

This approach allows you to customize the text inside the drop-down list.

In this article