expressappframework-devexpress-dot-expressapp-dot-model-dot-imodellistview-0476d9b5.md
Specifies the current filter criteria for grid data.
Namespace : DevExpress.ExpressApp.Model
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
[CriteriaOptions("ModelClass.TypeInfo")]
[DefaultValue("")]
string Filter { get; set; }
<DefaultValue("")>
<CriteriaOptions("ModelClass.TypeInfo")>
Property Filter As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A string that specifies the current filter criteria for grid data.
|
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 |
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.
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 BlazorFilter Row
ShowFilterRowWindows FormsFilter and Search
Filter Button and Popup
Filter Editor and Filter Panel
Filter Control
Filter Row
See Also