[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Collapse]Data Editors
    Included Components
   [Expand]Implementation Details
   [Expand]Getting Started
   [Expand]Editor Types
   [Expand]Common Features
   [Expand]Range Control
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
     How to: Create a Checked ComboBox
     How to: Create an Image ComboBox
     How to: Create a ButtonEdit with a Custom Button
     How to: Create Edit Buttons with Custom Glyphs in Code
     How to: Create ProgressBarEdit and MarqueeProgressBarEdit Controls
     How to: Create ListBoxEdit, CheckedListBoxEdit and RadioListBoxEdit
     How to: Bind Editors to Data
     How to: Implement a Custom Validation Procedure
     How to: Customize the Appearance of a Standalone Editor
     How to: Customize the Appearance of an In-place Editor
     How to: Apply Style Settings to the ComboBoxEdit
     How to: Customize the Appearance of the Editor's Error Tooltip
     How to: Customize the Appearance of the Editor's Items Panel
     How to: Customize the Appearance of the Editor's Borders
     How to: Customize the Image Editor's Menu
     How to: Customize ComboBox and Lookup Editors
     How to: Locate Information within ListBoxEdit using the Search Control
     How to: Format Display Values via Standard Format Specifiers
     How to: Format Display Values via Composite Formatting
     How to: Process New Values in LookUpEdit
     How to: Create a SparklineEdit Control
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Customize ComboBox and Lookup Editors

The ComboBoxEdit and LookUpEdit controls derive from the LookUpEditBase class, and provide the same set of data editing capabilities. These include auto-complete, incremental filtering and edit value validation on text input. By default, however, the same capabilities are disabled for one data editor, while these are enabled for another editor. For instance, by default, the auto-complete feature is enabled for LookUpEdit and is disabled for ComboBoxEdit. This document describes the differences between ComboBoxEdit and LookUpEdit, and shows how to set-up this or that functionality.

The following table shows the default set-up of the ComboBox and Lookup data editors.

Data Editor Auto-Complete Incremental Filtering Input Validation
ComboBoxEdit No No Yes
LookUpEdit Yes Yes No

Expanded Auto-Complete and Input Validation

If Automatic Completion is enabled, the text typed by an end-user within the edit box is automatically completed if it matches a value in the dropdown. Before the typed value is assigned to the editor's BaseEdit.EditValue property, it is validated. If an end-user has typed a new value that does not match any value displayed within the dropdown, the editor fires the LookUpEditBase.ProcessNewValue event allowing a new value to be added to an items source. If this event is not handled, a new value is automatically discarded.

The BaseEdit.ValidateOnTextInput option controls the times when data validation occurs. If it is enabled, the edit value is automatically validated while an end-user types within the edit box. Otherwise, the new value is validated before the editor loses focus. If the BaseEdit.ValidateOnEnterKeyPressed option is enabled, a new value is also validated after the ENTER key has been pressed.

Expanded Example: Enabling Data Editing in a ComboBoxEdit

Expanded See Also

Is this topic helpful?​​​​​​​