Skip to main content
A newer version of this page is available. .
All docs
V21.2

OptionsColumnFilter.AllowInHeaderSearch Property

Gets or sets whether a search box is enabled in the current column’s header. This property is in effect if the GridOptionsFilter.InHeaderSearchMode option is set to TextFilter.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v21.2.dll

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

Declaration

[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean AllowInHeaderSearch { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A value that specifies whether a search box is enabled in the current column’s header.

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.

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowInHeaderSearch
GridColumn
.OptionsFilter .AllowInHeaderSearch

Remarks

Set the GridView.OptionsFilter.InHeaderSearchMode property to TextFilter or TextSearch to enable built-in search boxes within the View’s column headers. Users can type text in the search boxes to filter against the columns, or search in the columns.

Data Grid - In-header search box

The GridColumn.OptionsFilter.AllowInHeaderSearch property allows you to disable header search boxes for individual columns.

The following example enables search boxes for all grid columns except the colOrderID column:

gridView1.OptionsFilter.InHeaderSearchMode = GridInHeaderSearchMode.TextFilter;
colOrderID.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False;

To disable search boxes in all columns except for specific columns, do the following:

  • Set the GridView.OptionsFilter.InHeaderSearchMode property to TextFilter or TextSearch.
  • Set the GridColumn.OptionsFilter.AllowInHeaderSearch property to False for all columns that do not require header search boxes.

A column’s header search box is disabled if the AllowInHeaderSearch property is set to Default or True, and the GridView.OptionsFilter.InHeaderSearchMode property is set to Default or Disabled.

See Also