Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Collapse]Editors and Simple Controls
    Templated ListBox Items
   [Expand]Simple Editors
   [Collapse]Lookup Editors
     Lookup Editors and Main Settings
     Standard Binding (to Simple Data Types)
     Advanced Binding (to Business Objects)
     Using a Dictionary Lookup Data Source
     Combobox Mode - Allow Entering New Values
     Cascading Lookups
   [Expand]Token Edit Control
   [Expand]Breadcrumb Edit Control
   [Expand]Range Control
   [Expand]Image Slider
    Camera Control
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Combobox Mode - Allow Entering New Values

In Combobox Mode, a LookUpEdit and GridLookUpEdit controls can act as a standard Windows Forms ComboBox control.

  • The editor's dropdown displays records from a lookup data source.
  • An end-user can enter any value in the edit box, including values that do not exist in the lookup data source.

To enable combobox mode, use the following properties.
Note

The SearchLookUpEdit and TreeListLookUpEdit controls do not support combobox mode.

Expanded Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T378371.

This example shows the use of LookupEdit and GridLookupEdit controls in combobox mode, in which the editors accept any text in the edit box. An end-user can select an existing value from a lookup data source or type any string. The text entered is saved in the editor's edit value when the editor loses focus.
Lookup data sources for the LookupEdit and GridLookupEdit controls are an array of strings and a list of business objects, respectively.
Combobox mode is enabled when the following conditions are met:
- the AcceptEditorTextAsNewValue property enables entering custom text in the edit box.
- the ValueMember and DisplayMember properties are set to an empty string (see the LookupEdit control initialization), or to the same field in the lookup data source (see the GridLookupEdit control initialization).
- the TextEditStyle property is set to Standard to enable text editing.

How would you rate this topic?​​​​​​​