LookUpEditBase.SubstituteDisplayFilter Event

Allows you to customize the filter applied by LookUpEdit or ComboBoxEdit (for example, to filter data by an additional/another column).

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v21.1.dll


public event EventHandler<SubstituteDisplayFilterEventArgs> SubstituteDisplayFilter

Event Data

The SubstituteDisplayFilter event's data class is DevExpress.Xpf.Editors.Helpers.SubstituteDisplayFilterEventArgs.


In the code sample below, an editor filters items by FirstName with the following configuration:

<dxg:LookUpEdit DisplayMember="FirstName" .../> 
public class Person {
    public string FirstName { get; set; }
    public string LastName { get; set; }

To filter items by both FirstName and LastName, add a corresponding condition in the SubstituteDisplayFilter event handler:

void SubstituteDisplayFilter(object sender, SubstituteDisplayFilterEventArgs e) {
    if (string.IsNullOrEmpty(e.DisplayText))
    var extraFilter = CriteriaOperator.Parse("StartsWith(LastName,?)", e.DisplayText);
    e.DisplayFilter = new GroupOperator(GroupOperatorType.Or, extraFilter, e.DisplayFilter);
    e.Handled = true;
See Also