Skip to main content

TcxExtLookupComboBox Class

Represents a lookup editor displaying a grid View in its dropdown window.

Declaration

TcxExtLookupComboBox = class(
    TcxCustomExtLookupComboBox
)

Remarks

A TcxExtLookupComboBox control displays a data-aware grid View in its dropdown window which is specified by the Properties.View attribute. Similar to other Express Editors, you have to use the attributes of the Properties object to customize an ExtLookupEditor.

A TcxExtLookupComboBox control allows you to edit values indirectly. You are not able to type the text to change the edit value. Instead, you change the edit value by picking up a record from the dropdown View. The View’s selected record provides values for the display text (drawn in the edit box) and the edit value of TcxDBExtLookupComboBox.

You cannot modify the text (display value) in the edit box. It is used for display purpose only to identify the record being currently selected.

The edit value of an ExtLookupEditor matches a value of the Properties.KeyFieldNames field of the currently selected record. When you select a specific record within the dropdown View, the control’s edit value is automatically changed. It always holds a value of the record’s Properties.KeyFieldNames field. To access the edit value, see the published EditValue property. It is possible to specify several key field names by separating them with the semicolon. In this case, EditValue will contain an array of variants.

Changing EditValue automatically selects another record in the dropdown View whose key field values are equal to a new edit value(s).

To assign the View to an ExtLookupEditor, see its Properties.View attribute. It is possible to use only a data-aware (Banded) Table View for this purpose. A View repository component represented by the TcxGridViewRepository class helps you to create and customize Views.

Note

you must not reuse the same View in your grid control and the ExtLookupEditor.

To get more information on customizing ExtLookupEditors, refer to the TcxCustomExtLookupComboBox topic.

See Also