.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

FilterController Class

Represents a ViewController descendant that contains the FullTextSearch and SetFilter Actions.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v21.2.dll


public class FilterController :


The FilterController is intended for presenting the FullTextSearch and SetFilter Actions.

In a Windows Forms application:



In an ASP.NET Web Forms application:



For details on the FullTextSearch and SetFilter Actions, refer to the description of the FilterController.FullTextFilterAction and FilterController.SetFilterAction properties, that provide access to these Actions.

To customize the default behavior of the FullTextSearch and SetFilter Actions, you can inherit from this Controller, or subscribe to its events. In addition, you can access the Actions to modify their behavior.

This Controller does not have UI-specific descendants. If you require, you can inherit from this Controller to implement a UI-specific functionality. When deriving from the FilterController, the following protected virtual methods are available, and can be overridden:


When is it called?



Invoked when the FilterController is activated.

Applies the criteria that is set for the current List View’s IModelListView.Criteria property in the Application Model. In addition, creates items for the SetFilter Action using the ListView | Filters node from the Application Model. Executes the SetFilter Action, setting the filter specified by the Filters node’s CurrentFilterID property.


First, it is invoked when the FilterController is activated to apply an initial filter. Second, it is invoked when the SetFilter Action is executed, to apply the selected filter.

Generates a CriteriaOperator from the passed criterion, and adds it to the Criteria collection of the current List View’ CollectionSource.


Invoked to generate a tooltip for the SetFilter Action. The tooltip is formed from the criteria applied to the current View’s collection source.

  • If the Views | View node defining the current List View has the Criteria property set, this method applies the specified criterion via the ApplyCriteria method.
  • If the Views | View | Filters node exists for the current List View, its child nodes are used to populate the SetFilter Action’s Items collection. The item that is represented by the Filters node’ CurrentFilterID property is set as a selected item (see SingleChoiceAction.SelectedItem), and its criterion is applied to the List View via the SetFilter method.


Invoked as a result of executing the SetFilter Action.

Represents the SetFilter Action’s SingleChoiceAction.Execute event handler. Applies the selected filter passed as the Execute event handler’s parameter, to the current List View, via the ApplyFilter method. In addition, it sets the selected filter for the CurrentFilterID property of the current View’s Views | View node.


Invoked as a result of executing the FullTextSearch Action.

Represents the FullTextSearch Action’s ParametrizedAction.Execute event handler. Using the Execute event arguments, generates a CriteriaOperator, and adds it to the Criteria collection of the current List View’s CollectionSource. To generate the CriteriaOperator, the static DevExpress.ExpressApp.Filtering.FullTextSearchCriteriaBuilder class is used.


Invoked by the FullTextSearch method.

Raises the FilterController.CustomBuildCriteria event. To implement a custom algorithm for building criteria in the FilterController class descendant, override this method. Set the CustomBuildCriteriaEventArgs.Handled parameter to true, to prohibit executing a default algorithm. Assign the generated criteria to the CustomBuildCriteriaEventArgs.Criteria parameter.


Invoked by the FullTextSearch method.

Creates a SearchCriteriaBuilder object to be used for building criteria. Override this method, to return an object of the custom class that implements the ISearchCriteriaBuilder interface. Note that in this instance, this object’s BuildCriteria method will be called to generate the criterion for the current List View.


Invoked by the FullTextSearch method.

Raises the FilterController.CustomGetFullTextSearchProperties event. To collect properties for a search in a custom way in the FilterController class descendant, override this method. Set the CustomGetFullTextSearchPropertiesEventArgs.Handled parameter to true to prohibit collecting the properties in the default manner. Assign the set of the collected properties to the CustomGetFullTextSearchPropertiesEventArgs.Properties parameter.


Invoked when the current List View’s ListView.Model property is changed (see View.ModelChanged), to remove the filter specified by the Criteria property of the List View’s Views | View node.

Removes the passed criterion from the Criteria collection of the current List View’ CollectionSource.


Invoked as a result of changing the environment.

Checks whether the active or enabled state of the SetFilter and FullTextSearch Actions should be changed after the environment has been changed.

Public members are described individually in the documentation.

This Controller is activated for List Views only. To ascertain whether the Controller is active, use the Controller.Active property. If you need to know the reason for its deactivation or activation at runtime, use the DiagnosticInfo Action.

Information on the FilterController and its SetFilter and FullTextSearch Actions is available in the Application Model‘s ActionDesign node. To access it, use the Model Editor.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FilterController class.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also