Skip to main content
All docs
V24.2

TreeListView.CustomNodeFilterCommand Property

Gets or sets a command that uses custom rules to filter nodes.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public ICommand<NodeFilterArgs> CustomNodeFilterCommand { get; set; }

Property Value

Type Description
ICommand<NodeFilterArgs>

A command that uses custom rules to filter nodes.

Remarks

Bind a command to the CustomNodeFilterCommand property to maintain a clean MVVM pattern. The command works like a CustomNodeFilter event handler and allows you to specify custom filter rules in a View Model.

Use the CustomNodeFilterCommand property to apply a custom filter condition. The custom filter takes priority over the filter criteria applied in a column’s Drop-down Filter or the Automatic Filter Row.

To apply a custom filter condition, create a command that uses custom rules to filter nodes and assign this command to the CustomNodeFilterCommand property. You can use the NodeFilterArgs.Item property to get the processed data source record. The NodeFilterArgs.DefaultVisibility property returns the node’s visibility state based on the applied filter.

To hide or show a node, specify the NodeFilterArgs.Visible property.

Note

If you set the TreeListView.FilteringMode property to TreeListFilteringMode.Recursive and hide a node, the GridControl hides all its child nodes regardless of their visibility.

Refer to the following help topic for more information: Filtering and Searching.

See Also