DxTreeList.FilterTreeMode Property
Specifies how the TreeList component displays filtered nodes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(TreeListFilterTreeMode.ParentBranch)]
[Parameter]
public TreeListFilterTreeMode FilterTreeMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TreeListFilterTreeMode | ParentBranch | An enumeration value. |
Available values:
Name | Description |
---|---|
ParentBranch | The TreeList component displays a node that meets the filter criteria and all its parent nodes, even if they do not meet the criteria. |
EntireBranch | The TreeList component displays a node that meets the filter criteria and all its parent and child nodes, even if they do not meet the criteria. |
Remarks
When a filter is applied, the TreeList component displays all nodes that meet the filter criteria with their parents (even if parent nodes do not meet the criteria).
Set the FilterTreeMode
property value to EntireBranch
to display both parent and child nodes of each node that meets the filter criteria:
@inject EmployeeTaskService TaskService
<DxTreeList Data="@Data"
KeyFieldName="Id"
ParentKeyFieldName="ParentId"
ShowFilterRow="true"
FilterTreeMode="TreeListFilterTreeMode.EntireBranch" >
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" Width="40%" />
<DxTreeListDataColumn FieldName="EmployeeName"
FilterRowValue='"John"'
FilterRowOperatorType="TreeListFilterRowOperatorType.Contains" />
<DxTreeListDataColumn FieldName="StartDate" MinWidth="100" />
<DxTreeListDataColumn FieldName="DueDate" MinWidth="100" />
<DxTreeListDataColumn FieldName="Progress" DisplayFormat="{0}%" />
</Columns>
</DxTreeList>
@code {
List<EmployeeTask> Data { get; set; }
protected override void OnInitialized() {
Data = TaskService.GenerateData();
}
}