Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxPager.PageCount Property

Specifies the total number of pages in the pager.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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

Razor
<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

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

Run Demo: Pager - Limit the Number of Page Buttons

See Also