Skip to main content
A newer version of this page is available. .

TreeList.CustomRowFilter Event

Allows you to specify the node visibility, regardless of the currently applied filter.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v19.2.dll

Declaration

[DXCategory("Behavior")]
public event CustomRowFilterEventHandler CustomRowFilter

Event Data

The CustomRowFilter event's data class is CustomRowFilterEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets whether the event is handled and no default processing is required. Inherited from FilterNodeEventArgs.
IsFitDefaultFilter Gets whether the row matches the filter applied to the tree list. Inherited from FilterNodeEventArgs.
Item[TreeListColumn] Gets a value of a specific column in the processed TreeListNode.
Node Gets the currently processed node. Inherited from FilterNodeEventArgs.
Row Gets an object representing a data row in the underlying data source that corresponds to the processed TreeListNode.
Visible Gets whether the processed TreeListNode is visible.

Example

The example below ensures that Tree List records with the 15% discount are always visible, regardless of the currently applied filtering condition.

TreeList - Custom Filter

private void TreeList1_CustomRowFilter(object sender, CustomRowFilterEventArgs e) {
    TreeList treeList = sender as TreeList;
    string discount = treeList.GetRowCellDisplayText(e.Node, treeList.Columns["Discount"]);
    if (discount == "15%") {
        e.Visible = true;
        e.Handled = true;
    }
}
See Also