Back to Devexpress

ASPxGridViewSettings.ShowFilterRow Property

aspnet-devexpress-dot-web-dot-aspxgridviewsettings-1d4bd29b.md

latest6.0 KB
Original Source

ASPxGridViewSettings.ShowFilterRow Property

Gets or sets whether the grid displays the filter row.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

Property Value

TypeDefaultDescription
Booleanfalse

true to display the filter row; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ShowFilterRow
ASPxGridView

.Settings .ShowFilterRow

| | GridViewProperties |

.Settings .ShowFilterRow

|

Remarks

The filter row allows end users to type text directly into the row to filter data. Set the ShowFilterRow property to true to display the filter row at the top of the grid.

Use the ShowFilterRowMenu property to specify whether the grid displays the filter row buttons. Click a filter row button to invoke the context menu that allows you to select the required filter criteria. The ShowFilterRowMenuLikeItem property allows you to display the Like item in the filter row menu.

aspx
<dx:ASPxGridView ID="Grid" >
    ...
    <Settings ShowFilterRow="true" ShowFilterRowMenu="true" ShowFilterRowMenuLikeItem="true" />    
</dx:ASPxGridView>

Example

Web Forms:

aspx
<dx:ASPxGridView ID="Grid" >
    ...
    <Settings ShowFilterRow="true" />    
</dx:ASPxGridView>

MVC:

csharp
@Html.DevExpress().GridView(settings => {
    settings.Name = "gvFilterRow";
    settings.Settings.ShowFilterRow = true;
    ...
}).Bind(Model).GetHtml()

Concept

Online Demos

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

asp-net-mvc-grid-export-colored-grid-in-wysiwyg-mode/CS/Controllers/HomeController.cs#L48

csharp
settings.KeyFieldName = "ProductID";
settings.Settings.ShowFilterRow = true;

asp-net-mvc-grid-export-colored-grid-in-data-aware-mode/CS/Controllers/HomeController.cs#L58

csharp
settings.KeyFieldName = "ProductID";
settings.Settings.ShowFilterRow = true;

mvc-gridview-export-data-to-different-formats/CS/Controllers/HomeController.cs#L60

csharp
settings.KeyFieldName = "ID";
settings.Settings.ShowFilterRow = true;

asp-net-mvc-grid-export-colored-grid-in-wysiwyg-mode/VB/Controllers/HomeController.vb#L55

vb
settings.KeyFieldName = "ProductID"
settings.Settings.ShowFilterRow = True

asp-net-mvc-grid-export-colored-grid-in-data-aware-mode/VB/Controllers/HomeController.vb#L67

vb
settings.KeyFieldName = "ProductID"
settings.Settings.ShowFilterRow = True

mvc-gridview-export-data-to-different-formats/VB/Controllers/HomeController.vb#L55

vb
settings.KeyFieldName = "ID"
settings.Settings.ShowFilterRow = True
settings.Columns.Add("ID")

See Also

Grid View

ASPxGridViewSettings Class

ASPxGridViewSettings Members

DevExpress.Web Namespace