Skip to main content

GridControl.CustomRowFilter Event

Enables you to filter data rows using custom rules.

Namespace: DevExpress.Xpf.Grid

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

#Declaration

public event RowFilterEventHandler CustomRowFilter

#Event Data

The CustomRowFilter event's handler receives an argument of the DevExpress.Xpf.Grid.RowFilterEventArgs type.

#Remarks

Custom filtering is hiding particular rows that exist in a data source, 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 data rows, handle the CustomRowFilter event. This event is raised for each record in a data source. The currently processed record is identified by its index in a data source, returned by the event parameter's ListSourceRowIndex property. To identify the row which corresponds to the processed record, use the GridControl.GetRowHandleByListIndex method.

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

See Also