Skip to main content

TreeListView.CustomNodeFilter Event

Enables you to filter nodes using custom rules.

Namespace: DevExpress.Xpf.Grid

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

#Declaration

public event TreeListNodeFilterEventHandler CustomNodeFilter

#Event Data

The CustomNodeFilter event's handler receives an argument of the TreeListNodeFilterEventArgs type. The following properties provide information specific to this event:

Property Description
Handled Gets or sets whether or not custom filtering is handled and no default processing is required.
Node Gets the processed node.
Visible Gets or sets the processed node's visibility.

#Remarks

Custom filtering is hiding individual nodes, or making them visible. Custom filtering takes priority over filter criteria applied using a column's filter dropdown or using the Automatic Filter Row.

To manually filter nodes, handle the CustomNodeFilter event. This event is raised for each node. The currently processed node is returned by the event parameter's TreeListNodeFilterEventArgs.Node property.

To hide or show a node, specify the event parameter's TreeListNodeFilterEventArgs.Visible property, and set the TreeListNodeFilterEventArgs.Handled property to true. If the TreeListNodeFilterEventArgs.Handled parameter is set to false, the node's visibility is determined by the filter currently applied to a View. So, the node will only be visible if it matches the View's filter. Otherwise, it will be hidden.

NOTE

If a node is hidden, all its child nodes are also hidden regardless of their visibility.

See Also