Skip to main content
All docs
V24.1

DxTreeList.PagerSwitchToInputBoxButtonCount Property

Specifies the total number of pages when the pager switches from numeric buttons to the input box in Auto mode.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(11)]
[Parameter]
public int PagerSwitchToInputBoxButtonCount { get; set; }

Property Value

Type Default Description
Int32 11

The total number of pages when the pager switches to the input box.

Remarks

When the PagerNavigationMode property is set to Auto (the default value), the pager displays the input box in the following cases:

  • The total number of pages is greater than or equal to the PagerSwitchToInputBoxButtonCount value.
  • The TreeList is displayed on small devices. In this case, the PagerSwitchToInputBoxButtonCount value is ignored.

In other cases, the pager displays numeric buttons.

The following example enables the input box when the total number of pages is greater than or equal to 5:

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId"
            PageSize="5"
            PagerSwitchToInputBoxButtonCount="5"
            PageSizeSelectorVisible="true"
            PageSizeSelectorItems="@(new int[] { 5, 10, 15 })">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

@code {
    List<EmployeeTask> TreeListData { get; set; }

    protected override void OnInitialized() {
        TreeListData = EmployeeTaskService.GenerateData();
    }
}

Blazor TreeList Pager Switch to Input Box

Run Demo: TreeList - Paging

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

See Also