FilterConditionCollection Class
A collection of filter conditions. This class is supported in version 16.2 and older.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v18.2.dll
Declaration
[ListBindable(false)]
[Browsable(false)]
public class FilterConditionCollection :
FilterConditionCollectionBase,
IEnumerable<FilterCondition>,
IEnumerable
Related API Members
The following members return FilterConditionCollection objects:
Remarks
The TreeList.FilterConditions property of the FilterConditionCollection type is used to specify filter conditions in version 16.2 and older. In version 17.1 and newer, we suggest that you use the advanced filtering mechanism, as described in the Filtering topic.
If a specific node matches any of the filter conditions in the TreeList.FilterConditions collection, this node is hidden. For the TreeList.FilterConditions property to be in effect, the TreeListOptionsBehavior.EnableFiltering property needs to be set to true.
Example
Important
This example targets version 16.2 and older.
The example applies filter conditions that hide rows that contain “San Francisco” or “Toronto “in the colLOCATION column. The filter conditions are created using the TreeList.FilterConditions property.
By default, filtering is disabled in version 16.2 and older. The TreeListOptionsBehavior.EnableFiltering property needs to be set to true to enable filtering.
using DevExpress.XtraTreeList;
treeList1.OptionsBehavior.EnableFiltering = true;
FilterCondition fc = new FilterCondition(FilterConditionEnum.Equals, colLOCATION, "San Francisco");
FilterCondition fc1 = new FilterCondition(FilterConditionEnum.Equals, colLOCATION, "Toronto");
treeList1.FilterConditions.Add(fc);
treeList1.FilterConditions.Add(fc1);