Back to Devexpress

IObjectSpace.ParseCriteria(String) Method

expressappframework-devexpress-dot-expressapp-dot-iobjectspace-dot-parsecriteria-x28-system-dot-string-x29.md

latest2.6 KB
Original Source

IObjectSpace.ParseCriteria(String) Method

Tries to convert the specified string representation of an expression to its CriteriaOperator equivalent.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
CriteriaOperator ParseCriteria(
    string criteria
)
vb
Function ParseCriteria(
    criteria As String
) As CriteriaOperator

Parameters

NameTypeDescription
criteriaString

A string representation of the criteria.

|

Returns

TypeDescription
CriteriaOperator

A CriteriaOperator object that specifies an expression.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ParseCriteria(String) method.

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.

xaf-how-to-use-criteria-property-editors/CS/EFCore/CriteriaPropertiesEF/CriteriaPropertiesEF.Module/Controllers/CriteriaController.cs#L28

csharp
collectionSource.Criteria.Clear();
collectionSource.Criteria[e.SelectedChoiceActionItem.Caption] = ObjectSpace.ParseCriteria(e.SelectedChoiceActionItem.Data as string);
collectionSource.EndUpdateCriteria();

See Also

IObjectSpace Interface

IObjectSpace Members

DevExpress.ExpressApp Namespace