Skip to main content
All docs
V24.1

DxTreeList.ShowAllRowsChanged Event

Fires when the ShowAllRows property value changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<bool> ShowAllRowsChanged { get; set; }

Parameters

Type Description
Boolean

The new ShowAllRows property value.

Remarks

Enable the ShowAllRows option to display all TreeList rows on one page. Note that if the TreeList contains a large amount of data rows, this option can affect TreeList performance.

Handle the ShowAllRowsChanged event to react when the ShowAllRows property value changes.

@inject EmployeeTaskService EmployeeTaskService

<DxTreeList Data="TreeListData"
            KeyFieldName="Id"
            ParentKeyFieldName="ParentId"
            ShowAllRowsChanged=@OnShowAllRowsChanged
            PageSizeSelectorVisible="true"
            PageSizeSelectorAllRowsItemVisible="true"
            PageSizeSelectorItems="@(new int[] {3,4,5})"
            @bind-PageSize=@PageSize>
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

@Message

@code {
    List<EmployeeTask> TreeListData { get; set; }
    string Message { get; set; }
    int PageSize = 3;
    void OnShowAllRowsChanged(bool AllRows) {
        if (AllRows)
            Message = "All rows are visible";
        else
            Message = "Not all rows are visible";
    }
    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.

See Also