TreeListView.CustomFilterPopupList Event
Allows you to filter values displayed in a column Drop-down Filter.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Event Data
The CustomFilterPopupList event's data class is CustomColumnFilterListEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Column | Gets or sets a column which owns the processed cell. |
Node | Gets or sets a node which contains the processed cell. |
Visible | Gets or sets whether the processed value is displayed within a column’s Drop-down Filter. |
Remarks
The TreeListView raises the CustomFilterPopupList
event before a column Drop-down Filter is populated with unique values. This event is raised for each value displayed in the processed column and allows you to hide values from the list.
The CustomColumnFilterListEventArgs.Node and CustomColumnFilterListEventArgs.Column properties specify the processed node and column. To obtain the processed value, use the TreeListView.GetNodeValue method. To hide a value from the list, set the CustomColumnFilterListEventArgs.Visible property to false
.
The following code sample demonstrates how to hide root node values from the filter list:
<dxg:TreeListControl.View>
<dxg:TreeListView TreeDerivationMode="ChildNodesSelector"
ChildNodesPath="Tasks"
FilteringMode="ParentBranch"
CustomFilterPopupList="TreeListView_CustomFilterPopupList"/>
</dxg:TreeListControl.View>
void TreeListView_CustomFilterPopupList(object sender, DevExpress.Xpf.Grid.TreeList.CustomColumnFilterListEventArgs e) {
e.Visible = e.Node.Level != 0;
}
Handle the CustomUniqueValues event to populate the filter list with custom values.