TcxDBLookupComboBox Class
Represents a data-aware editor displaying a set of values from a lookup dataset used for editing values in another dataset.
Declaration
TcxDBLookupComboBox = class(
TcxCustomLookupComboBox
)
Remarks
Use the TcxDBLookupComboBox control to provide a user with a dropdown list of values from one dataset, which are used for editing records in another dataset. The dataset containing values for the dropdown list is specified via the Properties.ListSource property. The dataset whose records are edited is specified via the DataBinding.DataSource property. A relation must be established between these two datasets. This relation connects a key field from the first dataset (the required field name is specified via the Properties.KeyFieldNames property) to a field from the second dataset (the required field name is specified via the DataBinding.DataField property).
If a TcxDBLookupComboBox control is linked to a lookup field component, it automatically obtains its property values, such as Properties.ListFieldNames, Properties.KeyFieldNames from a lookup field component. In this instance, an editor is set up right after the lookup field name is assigned to the DataBinding.DataField property.
When a user navigates through the dropdown list, the editor’s EditValue matches the value of the Properties.ListSource key field, corresponding to the currently selected dropdown list record. If EditValue is posted, the DataBinding.DataSource field value specified via the DataBinding.DataField property matches the current EditValue.
The Properties.ListFieldIndex property specifies the index of the field whose value is displayed within the edit box of the lookup editor. A user is allowed to enter text within the editor’s edit box. In this instance, the editor implements an incremental search within the dropdown list in order to locate the first record whose ListFieldIndex field value starts with the entered text.
If the Properties.IncrementalFiltering property value is True, the editor filters the dropdown list items based on the first characters entered into it: