DxDataGrid<T>.PagerAllowedPageSizes Property

Specifies predefined page sizes displayed in the page size selector.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public IEnumerable<int> PagerAllowedPageSizes { get; set; }

Property Value

Type Default Description
IEnumerable<Int32>

new int[] {5, 10, 20}

An IEnumerable<Int32> collection that stores page sizes.

Remarks

Use the PagerAllowedPageSizes property to specify predefined page sizes displayed in the page size selector. To display the selector, set the PagerPageSizeSelectorVisible property to true.

<DxDataGrid Data="@DataSource"
            ShowPager="true"
            PagerNavigationMode=@PagerNavigationMode.InputBox
            PagerPageSizeSelectorVisible="true"
            PagerAllDataRowsItemVisible="true"
            PagerAllowedPageSizes=@(new int[] {2,10,20,40})>
    <DxDataGridColumn Field="@nameof(Order.ShipName)" />
    <DxDataGridColumn Field="@nameof(Order.ShipCity)" />
    <DxDataGridColumn Field="@nameof(Order.ShipPostalCode)" />
    <DxDataGridColumn Field="@nameof(Order.ShipCountry)" />
    <DxDataGridColumn Field="@nameof(Order.Freight)" Width="80px" />
    <DxDataGridDateEditColumn Field="@nameof(Order.OrderDate)" DisplayFormat="d" Width="120px" />
    <DxDataGridDateEditColumn Field="@nameof(Order.ShippedDate)" DisplayFormat="d" Width="120px" />
</DxDataGrid>

DataGrid Page Size Selector

To display the All item in the page size selector, set the PagerAllDataRowsItemVisible property to true.

Run Demo: Data Grid - Paging

See Also