Skip to main content

DxGrid.PagerVisibleNumericButtonCount Property

Specifies the maximum number of numeric buttons displayed in the pager.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(5)]
[Parameter]
public int PagerVisibleNumericButtonCount { get; set; }

Property Value

Type Default Description
Int32 5

Specifies the maximum number of numeric buttons displayed in the pager.

Remarks

In numeric buttons mode, use the PagerVisibleNumericButtonCount property to specify the maximum number of buttons displayed in the pager simultaneously.

When the Grid renders for the first time, the pager shows a range of numeric buttons from 1 to the PagerVisibleNumericButtonCount value. If you set the PageIndex property to a value out of this range, the range changes to include the specified page. A user should click arrow navigation buttons to display other numeric buttons.

The following examples displays 10 numeric buttons in the pager.

@using Microsoft.EntityFrameworkCore
@inject IDbContextFactory<NorthwindContext> NorthwindContextFactory
@implements IDisposable

<DxGrid Data="@Data"
        PagerNavigationMode="PagerNavigationMode.NumericButtons"
        PagerVisibleNumericButtonCount="10">
    <Columns>
        <DxGridDataColumn FieldName="ShipName" />
        <DxGridDataColumn FieldName="ShipCity" />
        <DxGridDataColumn FieldName="ShipCountry" />
        <DxGridDataColumn FieldName="Freight" />
        <DxGridDataColumn FieldName="OrderDate" />
        <DxGridDataColumn FieldName="ShippedDate" />
    </Columns>
</DxGrid>

@code {
    object Data { get; set; }
    NorthwindContext Northwind { get; set; }

    protected override void OnInitialized() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        Data = Northwind.Orders.ToList();
    }

    public void Dispose() {
        Northwind?.Dispose();
    }
}

Blazor Grid Pager Numeric Button Count

Arrow navigation buttons are hidden if all the numeric buttons are displayed. To change this behavior, use the PagerAutoHideNavButtons property.

Run Demo: Data Grid - Paging

For more information about paging in the Grid component, refer to the following topic: Paging in Blazor Grid.

See Also