Skip to main content

TcxCustomDBLookupEdit Class

Serves as the base class for the LookupComboBox and ExtLookupComboBox editors.

Declaration

TcxCustomDBLookupEdit = class(
    TcxCustomLookupEdit
)

Remarks

This class represents the base class for lookup editors displaying values from a data source within a dropdown window. For a LookupComboBox editor, the data source is specified by its Properties.ListSource attribute. An ExtLookupComboBox displays a data-aware (banded) table view in its dropdown, and the data source is identified by this view.

TcxCustomDBLookupEdit provides settings that are common to both LookupComboBox and ExtLookupComboBox editors. To access them, use the Properties object.

Data source fields are identified by the Properties.ListFieldNames property value. For LookupComboBox editors, you can use this property to specify fields to display in the dropdown window. For each field, a column in the dropdown is created. The alternative way is to add columns directly via the Properties.ListColumns collection.

A data source field whose value is displayed within the editor’s edit box is determined via the Properties.ListFieldIndex property. It represents the zero-based index of a field within the Properties.ListFieldNames list.

For ExtLookupComboBox controls, this property is read-only. You can specify the field to display in the edit box via the Properties.ListFieldItem attribute.

The editor’s EditValue property value matches the value(s) of the data source key field(s) (identified via the Properties.KeyFieldNames property), corresponding to the record containing the currently displayed value. A user can specify the edit value manually, but if there is no corresponding record in a data source, the editor displays nothing.

Lookup combo box editors support the incremental search feature. When a user types within the edit region, the editor activates the dropdown window and locates the first value within the dropdown list whose first characters match the typed characters. If the Properties.IncrementalFiltering property value is True, the editor filters the dropdown list values based on the first typed characters.

See Also