Skip to main content
.NET 8.0+

FilterController.FullTextFilterAction Property

Provides access to the FilterController‘s FullTextSearch Action.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v25.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public ParametrizedAction FullTextFilterAction { get; }

Property Value

Type Description
ParametrizedAction

A ParametrizedAction object that is the FullTextSearch Action.

Remarks

The FullTextSearch Action searches the current List View‘s objects where persistent properties include individual words from a phrase typed by a user:

ASP.NET Core Blazor
Full Text Search in ASP.NET Core Blazor, DevExpress
Windows Forms
Full Text Search in Windows Forms, DevExpress
ASP.NET Web Forms
Full Text Search in ASP.NET Web Forms, DevExpress

Tip

The FullTextSearch Action is also available in List Views used by Lookup Property Editors. To enable Search mode, use either of the following approaches:

The following code snippet accesses the FullTextFilterAction and shows an object’s Detail View if the Action returns only one object.

using System;
using System.Collections;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;
using DevExpress.Persistent.BaseImpl;

// ...
public class FilterActionController : ObjectViewController<ListView, Person> {
    protected override void OnActivated() {
        base.OnActivated();
        FilterController filterController = Frame.GetController<FilterController>();
        if(filterController != null) {
            filterController.FullTextFilterAction.Executed += FullTextFilterAction_Executed;
        }
    }
    private void FullTextFilterAction_Executed(object sender, DevExpress.ExpressApp.Actions.ActionBaseEventArgs e) {
        int count = ((IList)View.CollectionSource.Collection).Count;
        if (count == 1) {
            IObjectSpace objectSpace = Application.CreateObjectSpace(typeof(Person));
            Object person = ((IList)View.CollectionSource.Collection)[0];
            e.ShowViewParameters.CreatedView = Application.CreateDetailView(
                objectSpace, objectSpace.GetObject(person));
        }
    }
}

When the FullTextSearch is executed, the Search Criteria Builder generates the CriteriaOperator object, which is then assigned to the FullTextSearchCriteria item of the List View Collection Source’s Criteria collection. To generate the criterion, the Builder collects the properties based on the Filter Controller’s FilterController.FullTextSearchTargetPropertiesMode property value.

The FullTextSearch Action splits the search request into separate words (uses whitespace characters as delimiters). The result includes records that contain all these words in an arbitrary order. If you need to find the exact match of the phrase (including spaces), enclose your request in quotation marks (“”).

Note

The FullTextSearch Action always performs a search over the Friendly Key property, even if the FullTextSearchTargetPropertiesMode.VisibleColumns mode is specified and Friendly Key column is hidden. The Friendly Key property is a business class property specified via the FriendlyKeyPropertyAttribute or via the IModelClass.FriendlyKeyProperty option in the Application Model.

The following techniques can be used to modify the default behavior of the FullTextSearch Action:

The FullTextSearch Action is active when the target object type is persistent, and the object collection is allowed for filtering. To ascertain why the FullTextSearch Action is deactivated or disabled, use the DiagnosticInfo Action. If you need to change the Action’s “active” or “enabled” state in code, use its ActionBase.Active or ActionBase.Enabled property, respectively.

Information on the FullTextSearch Action is available in the Application Model‘s ActionDesign node. To access it, use the Model Editor.

See Also