Back to Devexpress

RepositoryItemLookUpEdit.PopupFilterMode Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemlookupedit-dadf4a18.md

latest6.3 KB
Original Source

RepositoryItemLookUpEdit.PopupFilterMode Property

Gets or sets how data records in the popup window are filtered.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(PopupFilterMode.Default)]
[DXCategory("Data")]
public PopupFilterMode PopupFilterMode { get; set; }
vb
<DXCategory("Data")>
<DefaultValue(PopupFilterMode.Default)>
Public Property PopupFilterMode As PopupFilterMode

Property Value

TypeDefaultDescription
PopupFilterModeDefault

A PopupFilterMode enumerator value that specifies how data records in the popup window are filtered.

|

Available values:

NameDescription
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.SearchMode).

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 PopupFilterMode property sets the rule based on which data records in this LookUpEdit control’s popup window are filtered as an end-user enters text to the editor.

  • StartWith and Default modes specify that the editor popup displays only those data records that start with the same character(s) that an end-user entered;

  • Contains mode specifies that the editor popup displays all data records that contain the character(s) an end-user entered.

Note

You can choose between StartsWith and Contains modes when the RepositoryItemLookUpEditBase.TextEditStyle does not equal TextEditStyles.Standard. Otherwise, the control is limited to the StartWith mode only. Note that this limitation applies only to those look-up editors whose RepositoryItemLookUpEdit.SearchMode property equals AutoComplete.

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

winforms-cascading-lookups/CS/DXApplication1/Main.cs#L10

csharp
InitializeComponent();
lookUpEdit1.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;

winforms-cascading-lookups/VB/DXApplication1/Main.vb#L13

vb
InitializeComponent()
lookUpEdit1.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains
SetupLookUpEditor(gridLookUpEdit1, DataProvider.GetCategoryList(), "ID", "CategoryName")

See Also

PopupFilter

RepositoryItemLookUpEdit Class

RepositoryItemLookUpEdit Members

DevExpress.XtraEditors.Repository Namespace