Skip to main content

RepositoryItemGridLookUpEditBase.PopupFilterMode Property

Gets or sets how records in the dropdown window are filtered when typing text within the edit box.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DefaultValue(PopupFilterMode.Default)]
[DXCategory("Data")]
public PopupFilterMode PopupFilterMode { get; set; }

Property Value

Type Default Description
PopupFilterMode Default

A PopupFilterMode value that specifies the editor’s popup filter mode.

Available values:

Name Description
Default

This option is equivalent to the StartsWith option for GridLookUpEdit and TreeListLookUpEdit controls in the following cases:

1) users cannot edit text in the text box (RepositoryItemLookUpEditBase.TextEditStyle is not set to Standard),

2) users can edit text in the text box and the control automatically completes the entered text (RepositoryItemGridLookUpEdit.AutoComplete or RepositoryItemTreeListLookUpEdit.AutoComplete is enabled).

Otherwise, this option is equivalent to the Contains option for the GridLookUpEdit and TreeListLookUpEdit controls.

This option is equivalent to the StartsWith option for the LookUpEdit control.

This option is equivalent to the Contains option for the SearchLookUpEdit control. Users can use the Find Panel to search for keywords. You can use the ColumnViewOptionsFind.FindFilterColumns property to specify grid columns in which to search for keywords.

Contains

Selects records that contain the specified sub-string.

A search for rows is performed against the column specified by the editor’s Properties.DisplayMember property (RepositoryItemLookUpEditBase.DisplayMember).

StartsWith

Selects records whose field values start with the specified string.

A search for rows is performed against the column specified by the editor’s Properties.DisplayMember property (RepositoryItemLookUpEditBase.DisplayMember).

Remarks

The GridLookUpEdit and SearchLookUpEdit controls support record filtering, where typing text within the edit box displays only those records in the dropdown that meet the current criteria. The PopupFilterMode property specifies how records are filtered, using the StartsWith or Contains filter. The StartsWith filter selects records whose values of the DisplayMember field start with the typed text. The Contains filter selects records that contain the typed text within the DisplayMember field.

For the GridLookUpEdit control, if text editing is disabled via the RepositoryItemLookUpEditBase.TextEditStyle property, the StartsWith filter is always applied, and changing the PopupFilterMode property is not in effect.

If the PopupFilterMode property is set to Default, the filtering behavior is different for different editors, and is also dependent upon the editor’s settings. See PopupFilterMode.Default to learn more.

Note that if the PopupFilterMode property is set to Default for the SearchLookUpEdit control, a search for records is performed against all columns, by default. You can change this behavior by specifying the search columns via the RepositoryItemGridLookUpEditBase.PopupView‘s DevExpress.XtraGrid.Views.Base.ColumnViewOptionsFind.FindFilterColumns property. In the StartsWith or Contains modes, the search is performed against the field specified by the RepositoryItemLookUpEditBase.DisplayMember property.

See Also