New to Kendo UI for Angular? Start a free 30-day trial

Displaying all Grid records by using the built-in DropDownList in the Pager

Environment

ProductProgress® Kendo UI for Angular Grid

Description

How to display all Grid records by using the built-in DropDownList in the Pager?

Solution

  1. Implement a kendoPagerTemplate and define the built-in PagerPageSizesComponent inside the template.

    <ng-template kendoPagerTemplate>
        <kendo-pager-page-sizes></kendo-pager-page-sizes>
    </ng-template>
  2. Create an array of PageSizeItem objects and define an object with value all.

    public pageSizes: PageSizeItem[] = [
        { text: 'All', value: 'all' },
        ...
    ];
  3. Finally, bind the pageSizes property of the PagerPageSizesComponent to the collection of PageSizeItem objects.

    <ng-template kendoPagerTemplate>
        <kendo-pager-page-sizes 
            [pageSizes]="pageSizes"
        >
        </kendo-pager-page-sizes>
    </ng-template>

The following example demonstrates how to implement the described approach.

Example
View Source
Change Theme:

In this article

Not finding the help you need?