Skip to main content
A newer version of this page is available. .

DxPager.PageCount Property

Specifies the total number of pages in the pager.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public int PageCount { get; set; }

Property Value

Type Description
Int32

An integer value that specifies the number of pages.

Remarks

To specify a pager’s active page, use a zero-based ActivePageIndex property.

Pager Overview

<DxPager PageCount="@PageCount"
         @bind-ActivePageIndex="@ActivePageIndex" > 
</DxPager>

@code { 
    int PageCount { get; set; } = 5; 
    int ActivePageIndex { get; set; } = 1;
}

Run Demo: Pager

To hide unnecessary pages, use the VisibleNumericButtonCount property with the NumericButtons navigation mode.

Pager Navigation Buttons

<DxPager PageCount="100"
         ActivePageIndex="50"
         VisibleNumericButtonCount="7"
         NavigationMode="PagerNavigationMode.NumericButtons"> 
</DxPager>

Run Demo: Pager - Limit the Number of Page Buttons

See Also