Skip to main content
A newer version of this page is available. .
Tag

ColumnBase.AllowColumnFiltering Property

Gets or sets whether an end user can filter data by column. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public DefaultBoolean AllowColumnFiltering { get; set; }

Property Value

Type Description
DefaultBoolean

A DefaultBoolean enumeration value that specifies whether an end user can filter data by column.

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

The GridControl allows end users to filter data if the DataViewBase.AllowColumnFiltering property is set to true.

Individual columns provide the AllowColumnFiltering property, allowing the default behavior specified by the view, to be overridden. Setting this property to true or false overrides the default behavior. This can be useful when it is required to prevent an end user from invoking the filter dropdown of individual columns:

<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="OID" Header="Id" />
    <dxg:GridColumn FieldName="From" />
    <dxg:GridColumn FieldName="AnimationElement" 
                    UnboundType="Object" 
                    Visible="False" 
                    ShowInColumnChooser="False" 
                    AllowColumnFiltering="False" />
</dxg:GridControl.Columns>

Note

The AllowColumnFiltering property does not affect the availability Automatic Filter Row. To control the availability of Automatic Filter Row, use the ColumnBase.AllowAutoFilter property.

If the AllowColumnFiltering property is set to Default, the ability to filter data is controlled by the view’s DataViewBase.AllowColumnFiltering property. In this case, use the ColumnBase.ActualAllowColumnFiltering property to get whether an end-user can filter data by the current column.

Tip

Topic: Drop-down Filter

Run Demo: Filtering

See Also