Back to Devexpress

GridOptionsView.ShowAutoFilterRow Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsview-a056c32f.md

latest4.4 KB
Original Source

GridOptionsView.ShowAutoFilterRow Property

Gets or sets whether to display the Auto Filter Row.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool ShowAutoFilterRow { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property ShowAutoFilterRow As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to display the Auto Filter Row; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ShowAutoFilterRow
GridView

.OptionsView .ShowAutoFilterRow

|

Remarks

Use the ShowAutoFilterRow property to show/hide the Auto Filter Row, which allows users to filter data dynamically by typing within filter row cells.

csharp
public Form1()
{
  InitializeComponent();
  gridView1.OptionsView.ShowAutoFilterRow = true;
}
vb
Public Sub New()
  InitializeComponent()
  gridView1.OptionsView.ShowAutoFilterRow = True
End Sub

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowAutoFilterRow 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.

winforms-grid-highlight-cell-values-matching-text-in-autofilterrow/CS/CarsGridWinApp15/Main.cs#L27

csharp
GridView view = (GridView)sender;
if (!view.OptionsView.ShowAutoFilterRow || !view.IsDataRow(e.RowHandle))
    return;

winforms-grid-highlight-cell-values-matching-text-in-autofilterrow/VB/CarsGridWinApp15/Main.vb#L23

vb
Dim view As GridView = CType(sender, GridView)
If Not view.OptionsView.ShowAutoFilterRow OrElse Not view.IsDataRow(e.RowHandle) Then Return
Dim filterCellText As String = view.GetRowCellDisplayText(GridControl.AutoFilterRowHandle, e.Column)

See Also

ShowAutoFilterRowItem

Auto Filter Row

Filter and Search

GridOptionsView Class

GridOptionsView Members

DevExpress.XtraGrid.Views.Grid Namespace