Skip to main content
A newer version of this page is available. .
All docs
V22.1

FilterControl.AllowCustomExpressions Property

Gets or sets whether the Filter Control allows you to display, create, and edit custom expressions—expressions that cannot be converted to Filter Control nodes.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v22.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
public DefaultBoolean AllowCustomExpressions { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A value that specifies whether the Filter Control allows you to display, create, and edit custom expressions.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

Individual filter expressions (for example, expressions that contain advanced or custom functions) cannot be converted to Filter Control nodes. Below is an example:

[Sales Date] > AddDays(LocalDateTimeToday(), -25)

The AllowCustomExpressions property specifies whether and how the Filter Control displays these expressions. The following options are available:

  • True — Filter Control displays custom expressions, and allows users to edit existing and create new custom expressions.

    FilterControl-Custom Expressions

    Users can create new custom expressions from a context menu.

    FilterControl - Add Custom Expressions menu

    Users can click the expression to open the Expression Editor, which allows them to edit the expression.

    FilterControl-Custom Expressions-Expression Editor

  • Default — Filter Control displays custom expressions as simple text. A user cannot edit or create custom expressions. FilterControl-Custom Expressions-Default mode

  • False — Filter Control does not display custom expressions, and does not allow users to create new ones.

Field Display Names

The FilterControl assumes that the Expression Editor returns an expression that contains field names. The control does not support expressions if they contain fields’ custom display names (for instance, custom display names assigned using System.ComponentModel.DisplayNameAttribute).


See Also