expressappframework-devexpress-dot-expressapp-dot-model-dot-imodellistview-c59f81cf.md
Specifies the criteria according to which the current List View is filtered.
Namespace : DevExpress.ExpressApp.Model
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
[CriteriaOptions("ModelClass.TypeInfo")]
string Criteria { get; set; }
<CriteriaOptions("ModelClass.TypeInfo")>
Property Criteria As String
| Type | Description |
|---|---|
| String |
A string specifying the criteria according to which the current List View is filtered.
|
For additional information, refer to the Criteria Property in the Application Model and Ways to Build Criteria help topics.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Criteria 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.
IModelListView modelListView = (IModelListView)e.ModelNavigationItem.View;
int objectsCount = objectSpace.GetObjectsCount(typeof(Email), CriteriaOperator.Parse(modelListView.Criteria));
e.NavigationItem.Caption = "Inbox" + (objectsCount > 0 ? $" ({objectsCount})" : string.Empty);
See Also