Skip to main content
All docs
V24.1

DxTreeList.PageSize Property

Specifies the maximum number of rows displayed on a page.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(10)]
[Parameter]
public int PageSize { get; set; }

Property Value

Type Default Description
Int32 10

The number of rows displayed on a page.

Remarks

Use the PageSize property to specify the maximum number of rows displayed on a page. If you set this property to 0 or a negative value, the TreeList displays one row on each page.

You can display the page size selector, which allows users to change the page size at runtime. Once a user selects a new value in this selector, the PageSize property value is updated and the TreeList is redrawn.

Run Demo: TreeList - Paging

The PageSize property is not in effect if any of following properties is set to true:

The following code snippet changes the maximum number of rows displayed on a page:

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId" PageSize="4">
    <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 Page Size

The TreeList displays the vertical scrollbar when the height of the TreeList content exceeds the height of the component itself. In the image below, the TreeList height is limited to 300px and the PageSize property is set to 12.

Blazor TreeList Vertical Scrolling

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

Implements

See Also