Skip to main content
.NET 6.0+

XPView.CriteriaString Property

Gets or sets the criteria used to filter objects while the view is being loaded.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

[Browsable(false)]
[DefaultValue(null)]
public string CriteriaString { get; set; }

Property Value

Type Default Description
String null

A String value that specifies the criteria used to filter objects while the view is being loaded.

Remarks

using DevExpress.Xpo;
using DevExpress.Data.Filtering;
// ...
class SampleTable : XPBaseObject {
    public int Id {
        get { return fId; }
        set { SetPropertyValue(nameof(Id), ref fId, value); }
    }
    int fId;

    public string Name {
        get { return fName; }
        set { SetPropertyValue(nameof(Name), ref fName, value); }
    }
    string fName;

    public int Age {
        get { return fAge; }
        set { SetPropertyValue(nameof(Age), ref fAge, value); }
    }
    int fAge;

}

// ...
xpView1.CriteriaString = "Age > 30";

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CriteriaString 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.

See Also