LookUpEditBase.FilterCriteria Property
Gets or sets the filter expression applied to the LookUpEditBase.ItemsSource. This is a dependency property.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
CriteriaOperator | A CriteriaOperator descendant that represents an external filter expression. |
Remarks
The LookUpEdit control can filter data from an ItemSource before displaying. You can use the FilterCriteria property to set a Filter Expression.
You can create your filter expression when the editor’s ItemSource is a complex type object (it has its own properties). i.e., Contains([SomeProperty], '123')
You can use the DisplayColumn value to create a filter expression when the editor’s item source is a simple objects collection:
LookUpEdit.FilterCriteria = new FunctionOperator(
FunctionOperatorType.EndsWith,
new OperandProperty("DisplayColumn"),
new OperandValue("ask0")
);
For more information on how to create filter expressions, see Criteria Language Syntax and Creating Criteria.
How to: Populate ComboBoxEdit’s ItemsSource Based on Values From Other Cells
The GitHub example illustrates how to dynamically construct a filter depending on values from other cells.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FilterCriteria 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.