windowsforms-devexpress-dot-xtragrid-dot-columns-dot-optionscolumnfilter-31df9b20.md
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.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean AllowInHeaderSearch { get; set; }
<DefaultValue(DefaultBoolean.Default)>
<XtraSerializableProperty>
Public Overridable Property AllowInHeaderSearch As DefaultBoolean
| 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 | 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
|
You can access this nested property as listed below:
| Object Type | Path to AllowInHeaderSearch |
|---|---|
| GridColumn |
.OptionsFilter .AllowInHeaderSearch
|
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.
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;
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:
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