DxTreeList.PageSizeSelectorVisible Property
Specifies whether the TreeList displays the page size selector in the pager.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(false)]
[Parameter]
public bool PageSizeSelectorVisible { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | false |
|
Remarks
The page size selector allows users to change the number of rows displayed on a page. Once a user selects a new value in this selector, the PageSize property value is updated, and the TreeList is redrawn.
Enable the PageSizeSelectorVisible
option to show the page size selector. Use the PageSizeSelectorItems property to specify page size values available in a drop-down list.
You can also enable the PageSizeSelectorAllRowsItemVisible option to show the All item. When a user chooses this item, the TreeList displays all rows on one page and sets the ShowAllRows property to true
.
@inject EmployeeTaskService EmployeeTaskService
<DxTreeList Data="TreeListData"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
PageSizeSelectorVisible="true"
PageSizeSelectorItems="@(new int[] { 5, 10, 15 })"
PageSizeSelectorAllRowsItemVisible="true">
<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();
}
}
For more information about paging in the TreeList component, refer to the following topic: Paging in Blazor TreeList.