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.v18.1.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
Item[TreeListColumn] Gets a value of a specific column in the processed TreeListNode.
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