Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeList.ShowAllRowsChanged Event

Fires when the ShowAllRows property value changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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