aspnet-devexpress-dot-web-dot-aspxgridbase-3b5feb71.md
Gets or sets the filter criterion which is applied to the grid.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("")]
public string FilterExpression { get; set; }
<DefaultValue("")>
Public Property FilterExpression As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value that specifies the filter criterion.
|
The following examples illustrate different scenarios on how to filter the grid data.
Filter data by dates.
Applying a filter that selects departments whose budget is greater than 100,000 and that are located in Monterey. The filter criteria are displayed within the ASPxGridView’s Title Panel.
Select data rows whose product name starts with “ch”.
Get field names from the filter expression value.
The following code snippets (auto-collected from DevExpress Examples) contain references to the FilterExpression 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-create-report-based-on-grid-layout/CS/E4755/Models/MVCxGridViewState.cs#L17
}
FilterExpression = gridView.FilterExpression;
}
asp-net-web-forms-grid-create-report-based-on-grid-layout/CS/WebApplication1/ReportHelper.cs#L143
void InitFilters(ASPxGridView aspxGridView1) {
report.FilterString = aspxGridView1.FilterExpression;
}
asp-net-mvc-grid-create-report-based-on-grid-layout/VB/E4755/Models/MVCxGridViewState.vb#L74
Next item
FilterExpression = gridView.FilterExpression
End Sub
asp-net-web-forms-grid-create-report-based-on-grid-layout/VB/WebApplication1/ReportHelper.vb#L146
Private Sub InitFilters(ByVal aspxGridView1 As ASPxGridView)
report.FilterString = aspxGridView1.FilterExpression
End Sub
See Also