Incremental Search
- 2 minutes to read
You can enable the incremental search for the following controls.
Incremental search allows end-users to quickly locate list items. Matching values are highlighted in real time as a user types search criteria. The following image demonstrates a ListBoxEdit with incremental search enabled. Items that match the search criteria are highlighted.
A user can modify criteria in a short amount of time. After that time has elapsed, additional input is treated as new criteria. To increase/decrease this delay, use the following static fields:
- ListBoxEdit.TextSearchTimeOut - affects ListBoxEdit editors;
- LookUpEditBase.TextSearchTimeOut - affects ComboBoxEdit, LookUpEdit, and FontEdit.
Note
Incremental search is case-insensitive.
The following keyboard shortcuts allow end-users to navigate search results.
Keyboard shortcut | Action |
---|---|
Ctrl + Down Arrow | Move focus to the next matching item. |
Ctrl + Up Arrow | Move focus to the previous matching item. |
Esc | End incremental search. |
ListBoxEdit Incremental Search
To enable the incremental search feature for ListBoxEdit, set the ListBoxEdit.IncrementalSearch property to true.
The following example demonstrates ListBoxEdit with the incremental search feature enabled.
<dxe:ListBoxEdit ItemsSource="{Binding Data}" DisplayMember="Name" IncrementalSearch="True" />
Drop-down Editors Incremental Search
Drop-down editors, such as ComboBoxEdit, LookUpEdit and FontEdit require additional incremental search configuration.
To enable the incremental search feature for a drop-down editor, do the following:
- Set the LookUpEditBase.IncrementalSearch property to true.
- Set the ButtonEdit.IsTextEditable property to false.
- Set the LookUpEditBase.AutoComplete property to true.
The following example demonstrates ComboBoxEdit with the incremental search feature enabled.
<dxe:ComboBoxEdit ItemsSource="{Binding Data}" DisplayMember="Name" IncrementalSearch="True"
IsTextEditable="False" AutoComplete="True" />
Note
To enable the incremental search for LookUpEdit and ComboBoxEdit editors in token operation mode, set the PopupBaseEdit.FocusPopupOnOpen property to true.
The following example demonstrates a token combo box editor with incremental search enabled.
<dxe:ComboBoxEdit ItemsSource="{Binding Data}" DisplayMember="Name" IncrementalSearch="True"
IsTextEditable="False" AutoComplete="True" FocusPopupOnOpen="True">
<dxe:ComboBoxEdit.StyleSettings>
<dxe:TokenComboBoxStyleSettings/>
</dxe:ComboBoxEdit.StyleSettings>
</dxe:ComboBoxEdit>