Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomDBLookupEditProperties.KeyFieldNames Property

Specifies the name(s) of the data source field(s) whose values identify data source records.

#Declaration

Delphi
property KeyFieldNames: string read; write;

#Property Value

Type
string

#Remarks

Use the KeyFieldNames property to specify the names of the data source fields whose values are used to identify records. These field values match the editor’s edit value(s) accessible via the EditValue property.

For data-aware lookup editors (TcxDBLookupComboBox and TcxDBExtLookupComboBox), a field defined by the KeyFieldNames property also matches the field set via the editor’s DataBinding.DataField property.

When a user selects a specific record from the lookup editor’s dropdown window, this changes the edit value and display text. The editor’s edit value is obtained from the selected record’s field(s) identified by the KeyFieldNames property. The edit value is then used to modify the DataBinding.DataField value (for data-aware editors).

Conversely, changing the edit value programmatically or the DataBinding.DataField value (for data-aware editors only) results in selecting a record whose key field values (KeyFieldNames) match the edit value(s).

Note

To improve performance when working with large datasets, set the CaseSensitiveSearch property to True.

See Also