Back to Devexpress

GridColumn.SearchText Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-gridcolumn-bce7cb65.md

latest3.3 KB
Original Source

GridColumn.SearchText Property

Gets or sets the text of the column’s built-in header search box. This property is supported in Grid Views and Banded Grid Views.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DefaultValue("")]
[DXCategory("Data")]
[XtraSerializableProperty]
[XtraSerializablePropertyId(2)]
public string SearchText { get; set; }
vb
<DefaultValue("")>
<DXCategory("Data")>
<XtraSerializablePropertyId(2)>
<XtraSerializableProperty>
Public Property SearchText As String

Property Value

TypeDefaultDescription
StringString.Empty

The text of the built-in header search box.

|

Remarks

Use the GridView.OptionsFilter.InHeaderSearchMode property 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.

The SearchText property specifies the text of the column’s header search box.

csharp
colProductName.SearchText = "tofu";
vb
colProductName.SearchText = "tofu"

Set the SearchText property to an empty string, or call the GridView.ClearInHeaderSearchText method to clear the search text.

See the following topic for more information: GridView.OptionsFilter.InHeaderSearchMode.

See Also

InHeaderSearchMode

AllowInHeaderSearch

ClearInHeaderSearchText

HideInHeaderSearchTextBox()

ShowInHeaderSearchTextBox(GridColumn)

InHeaderSearchPrompt

ShowInHeaderSearchTextMode

GridColumn Class

GridColumn Members

DevExpress.XtraGrid.Columns Namespace