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.1.Core.dll

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

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

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