Back to Devexpress

ASPxGridBase.FilterExpression Property

aspnet-devexpress-dot-web-dot-aspxgridbase-3b5feb71.md

latest4.9 KB
Original Source

ASPxGridBase.FilterExpression Property

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

Declaration

csharp
[DefaultValue("")]
public string FilterExpression { get; set; }
vb
<DefaultValue("")>
Public Property FilterExpression As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the filter criterion.

|

Remarks

Concept

Examples

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.

Online Demos

GitHub Example

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

csharp
}
    FilterExpression = gridView.FilterExpression;
}

asp-net-web-forms-grid-create-report-based-on-grid-layout/CS/WebApplication1/ReportHelper.cs#L143

csharp
void InitFilters(ASPxGridView aspxGridView1) {
    report.FilterString = aspxGridView1.FilterExpression;
}

asp-net-mvc-grid-create-report-based-on-grid-layout/VB/E4755/Models/MVCxGridViewState.vb#L74

vb
Next item
    FilterExpression = gridView.FilterExpression
End Sub

asp-net-web-forms-grid-create-report-based-on-grid-layout/VB/WebApplication1/ReportHelper.vb#L146

vb
Private Sub InitFilters(ByVal aspxGridView1 As ASPxGridView)
    report.FilterString = aspxGridView1.FilterExpression
End Sub

See Also

Criteria Language Syntax

ASPxGridBase Class

ASPxGridBase Members

DevExpress.Web Namespace