Tab
A newer version of this page is available. Switch to the current version.

ListEditCustomFilteringEventArgs.FilterExpression Property

Gets or sets a value specifying the filter expression that is to be applied to the editor items.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public string FilterExpression { get; set; }
Public Property FilterExpression As String

Property Value

Type Description
String

A string value representing the filter expression.

Remarks

Use the FilterExpression property to specify the filter expression based on the Criteria Operator syntax. If the FilterExpression property is not specified, the "Contains/Starts with" comparison operator is used by default.

Using the FilterExpression property, you can specify how the editor items are filtered. The filter expression can be based on the data object properties (columns) available from the DataSource or on the built-in ListEditItem properties: the item's display text (ListEditItem.Text) or value (ListEditItem.Value) as shown in the following example.


CriteriaOperator CreateDefaultFilterExpression(string filter, IncrementalFilteringMode mode) {
    if(mode == IncrementalFilteringMode.StartsWith)
        return new FunctionOperator(FunctionOperatorType.StartsWith, new OperandProperty("ListEditItem.Text"), filter);
    if(mode == IncrementalFilteringMode.Contains)
        return new FunctionOperator(FunctionOperatorType.Contains, new OperandProperty("ListEditItem.Text"), filter);
    throw new Exception();
}
NOTE

The FilterExpression property is not in effect if the combo box is in custom binding mode.

See Also