Back to Devexpress

FilterControl.AllowCustomExpressions Property

windowsforms-devexpress-dot-xtraeditors-dot-filtercontrol-154b0243.md

latest2.9 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
public DefaultBoolean AllowCustomExpressions { get; set; }
vb
<DXCategory("Appearance")>
<DefaultValue(DefaultBoolean.Default)>
Public Property AllowCustomExpressions As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

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

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

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.

  • Default — Filter Control displays custom expressions as simple text. A user cannot edit or create custom expressions.

  • 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

FilterControl Class

FilterControl Members

DevExpress.XtraEditors Namespace