Skip to main content
.NET 6.0+

IModelListView.Filter Property

Specifies the current filter criteria for grid data.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v23.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

[DefaultValue("")]
[CriteriaOptions("ModelClass.TypeInfo")]
string Filter { get; set; }

Property Value

Type Default Description
String String.Empty

A string that specifies the current filter criteria for grid data.

Remarks

The IModelListView.Filter property value is passed to properties and methods of different List Editors to filter grid data in List Views. See the table below for all List Editors that support this property:

Platform List Editor Property or Method
ASP.NET Core Blazor DxGridListEditor DxGrid.GetFilterCriteria, DxGrid.SetFilterCriteria
Windows Forms GridListEditor ColumnView.ActiveFilterString
Windows Forms PivotGridListEditor PivotGridControl.ActiveFilterCriteria
ASP.NET Web Forms ASPxGridListEditor ASPxGridBase.FilterExpression
ASP.NET Web Forms ASPxPivotGridListEditor ASPxPivotGrid.Prefilter.CriteriaString

If IModelListView.DataAccessMode is set to Client in your application, a List View loads all its data first and applies a filter on the client side. In other data access modes, data is filtered on the server side.

Use IModelListView.Filter to create an initial filter where users can see the filter criteria when they first run the application and can change it later. If you want to hide the filter criteria from users and make it permanent, use the IModelListView.Criteria property.

Edit Filters in UI

You can change the filter criteria specified by this property in the application’s UI. XAF saves these changes in the Application Model and preserves them even after you close the View where the filter was applied.

XAF supports this behavior in all user-specified filters. For more information about filtering options available in XAF applications, refer to the following topics:

ASP.NET Blazor
Filter Row
ShowFilterRow
Windows Forms
Filter and Search
Filter Button and Popup
Filter Editor and Filter Panel
Filter Control
Filter Row
ASP.NET Web Forms
Filter Data
Filtering
Filter Control
Filter Row
See Also