Skip to main content
Tag

ColumnBase.AllowColumnFiltering Property

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

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.1.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 a user can filter data by the column.

Available values:

Name Description Return 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

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

Individual columns include the AllowColumnFiltering property that allows you to overwrite the behavior specified by the view. This can be useful when it is required to prevent a 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" 
                    UnboundDataType="{x:Type sys:Object}" 
                    Visible="False" 
                    ShowInColumnChooser="False" 
                    AllowColumnFiltering="False" />
</dxg:GridControl.Columns>

Note

The AllowColumnFiltering property does not affect the availability of the Automatic Filter Row. To control the availability of the 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 a user can filter data by the current column.

Tip

Topic: Drop-down Filter

Run Demo: Filtering

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowColumnFiltering property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also