DxTreeList.FilterTreeMode Property
Specifies how the TreeList component displays filtered nodes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(TreeListFilterTreeMode.Auto)]
[Parameter]
public TreeListFilterTreeMode FilterTreeMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TreeListFilterTreeMode | Auto | An enumeration value. |
Available values:
Name | Description |
---|---|
Auto | This option is identical to |
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. |
Nodes | The component ignores parent-child relationships and displays all nodes that meet the filter criteria at one level. |
Remarks
Specify the FilterTreeMode
property to set how the TreeList component displays filtered nodes:
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.
Nodes
The TreeList component ignores parent-child relationships and displays all nodes that meet the filter criteria at one level. This mode improves overall performance when the TreeList is bound to a large remote data source.
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.
When the FilterTreeMode
property is set to Auto
(default), the filter tree mode depends on the bound data source. When bound to the GridDevExtremeDataSource, the TreeList component switches to the Nodes
mode to improve performance. In other data binding scenarios, the TreeList operates in ParentBranch
mode.
The following example switches the TreeList component to the EntireBranch
mode:
@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();
}
}