Back to Devexpress

IModelListView.Filter Property

expressappframework-devexpress-dot-expressapp-dot-model-dot-imodellistview-0476d9b5.md

latest4.3 KB
Original Source

IModelListView.Filter Property

Specifies the current filter criteria for grid data.

Namespace : DevExpress.ExpressApp.Model

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[CriteriaOptions("ModelClass.TypeInfo")]
[DefaultValue("")]
string Filter { get; set; }
vb
<DefaultValue("")>
<CriteriaOptions("ModelClass.TypeInfo")>
Property Filter As String

Property Value

TypeDefaultDescription
StringString.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:

PlatformList EditorProperty or Method
ASP.NET Core BlazorDxGridListEditorDxGrid.GetFilterCriteria, DxGrid.SetFilterCriteria
Windows FormsGridListEditorColumnView.ActiveFilterString
Windows FormsPivotGridListEditorPivotGridControl.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.

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 BlazorFilter Row
ShowFilterRowWindows FormsFilter and Search
Filter Button and Popup
Filter Editor and Filter Panel
Filter Control
Filter Row See Also

List Editors

IModelListView Interface

IModelListView Members

DevExpress.ExpressApp.Model Namespace