windowsforms-devexpress-dot-xtraeditors-dot-lookupedit-49bd9ce4.md
Allows you to specify a custom filter expression for the LookUpEdit popup list.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event PopupFilterEventHandler PopupFilter
<DXCategory("Events")>
Public Event PopupFilter As PopupFilterEventHandler
The PopupFilter event's data class is DevExpress.XtraEditors.Controls.PopupFilterEventArgs.
The LookUpEdit raises the PopupFilter event before the dropdown list appears. Handle the PopupFilter event to filter records in the dropdown list. Use the e.Criteria event parameter to specify the filter expression.
The following example restricts the dropdown list to records where the “ShipCountry” field equals “Brazil”:
using DevExpress.Data.Filtering;
using DevExpress.XtraEditors.Controls;
void LookUpEdit1_PopupFilter(object sender, PopupFilterEventArgs e) {
e.Criteria = CriteriaOperator.Parse("ShipCountry == 'Brazil'");
}
Imports DevExpress.Data.Filtering
Imports DevExpress.XtraEditors.Controls
Private Sub LookUpEdit1_PopupFilter(ByVal sender As Object, ByVal e As PopupFilterEventArgs)
e.Criteria = CriteriaOperator.Parse("ShipCountry == 'Brazil'")
End Sub
See Also