I have 2 tables. For example, the main table has the following columns:
COL_A, COL_B, COL_C, COL_DOM_ID. Table 2 is the domain list and consists of ID, NAME. DOM_ID in table A is ID of table B.
Now I want to show table A in a DBgrid and show the DOM_ID column as combobox. The drop-down list must then contain the unique NAMES of table B and the ID (not the NAME), must then be saved when saving. So I'm looking for a way to create a key-value picklist for the combobox in the dbgrid. Is that possible? In the grid reference example, the picklist only consists of a tstringlist.
With this is seems to work. But there must be a better solution. :
https://www.thoughtco.com/place-dblookupcombobox-into-dbgrid-4077834