OptionsColumnFilter.AutoFilterCondition Property

Gets or sets the type of the comparison operator used to create filter conditions for the current column via the Automatic Filtering Row.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[XtraSerializableProperty]
[XtraSerializablePropertyId(3)]
public virtual AutoFilterCondition AutoFilterCondition { get; set; }
<XtraSerializableProperty>
<XtraSerializablePropertyId(3)>
Public Overridable Property AutoFilterCondition As AutoFilterCondition

Property Value

Type Description
AutoFilterCondition

An AutoFilterCondition value that determines the type of the comparison operator used to create filter conditions for the current column via the auto filter row.

Property Paths

You can access this nested property as listed below:

Object Type Path to AutoFilterCondition
GridColumn
.OptionsFilter.AutoFilterCondition
LayoutViewColumn
.OptionsFilter.AutoFilterCondition
BandedGridColumn
.OptionsFilter.AutoFilterCondition

Remarks

When an end-user types text within the Automatic Filtering Row's cell, a filter condition is created based upon the text entered. This filter is then applied to the View. The comparison operator used in this filter condition is determined by the column's AutoFilterCondition property.

See the AutoFilterCondition enumeration topic for information on the available types of operators.

The GridOptionsFilter.AllowAutoFilterConditionChange property controls whether end-users can change filter conditions in the auto filter row at runtime.

Example

In the following sample the AllowAutoFilterConditionChange property is disabled, Data Grid uses a default auto filter condition to filter records. The AutoFilterCondition property changes this default condition for the "Company Name" column from "Contains" to "Starts With".

autoFilterCondition

gridView1.OptionsView.ShowAutoFilterRow = true;
gridView1.OptionsFilter.AllowAutoFilterConditionChange = DevExpress.Utils.DefaultBoolean.False;
colCompanyName.OptionsFilter.AutoFilterCondition = DevExpress.XtraGrid.Columns.AutoFilterCondition.BeginsWith;
See Also