Skip to main content
.NET Framework 4.5.2+

FilterController.FullTextFilterAction Property

Provides access to the FilterController‘s FullTextSearch Action.

Namespace: DevExpress.ExpressApp.SystemModule

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public ParametrizedAction FullTextFilterAction { get; }

Property Value

Type Description
ParametrizedAction

A ParametrizedAction object representing the FullTextSearch Action.

Remarks

The FullTextSearch Action is intended to search the current List View‘s objects whose persistent properties include individual words from the combination typed by an end-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

The code below demonstrates how access the FullTextFilterAction and show 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.

By default, the FullTextSearch Action splits the search request into separate words by spaces. The result includes records that contain all these words in an arbitrary order. If you need to find the exact match of the phrase containing 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:

By default, 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 currently 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