Skip to main content

OptionsColumnFilter.AllowFilter Property

Gets or sets whether to display the filter button within the column’s header (field filter button in Layout Views).

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v25.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AllowFilter { get; set; }

Property Value

Type Default Description
Boolean true

true to display the filter button within the column’s header; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowFilter
GridColumn
.OptionsFilter .AllowFilter

Remarks

The AllowFilter property specifies whether the filter button is visible for an individual column. To apply this setting to all columns, use the View’s OptionsCustomization.AllowFilter property.

// Display the filter button for all columns in gridView1.
gridView1.OptionsCustomization.AllowFilter = true;

// Hide the filter button for the ID column.
gridView1.Columns["ID"].OptionsFilter.AllowFilter = false;

Note

If the View’s OptionsCustomization.AllowFilter option is disabled, the column’s OptionsFilter.AllowFilter property has no effect.

When the View generates columns automatically from business objects, you can disable filter UI using the Display attribute’s AutoGenerateFilter property:

[Display(AutoGenerateFilter = false)]
public string Email { get; set; }

See the following help topic for additional information: Data Annotation Attributes.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowFilter 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