Set the All Page Size Feature in the Grid

Environment

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

Description

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

Solution

After the document is ready, dynamically add the option for the All page size by using the dataSource of the DropdownList and thus allow for selecting the page size. The suggested approach also enables you to customize the text inside the DropDownList.

        $(function () {

            var grid = $('#grid').data('kendoGrid');

            var pageSizeDropDownList = grid.wrapper.children(".k-grid-pager").find("select").data("kendoDropDownList");
            console.log(pageSizeDropDownList)
            pageSizeDropDownList.dataSource.add({text:"All", value:'all'})
            pageSizeDropDownList.dataSource.sync()
        })
In this article
Not finding the help you need? Improve this article