In a Datagrid I have a column where I want to use a gdctLookupCombo as ControlType.
I set the lookupsource, lookupfield and the displaycolumns. The field of the column is an id(int) and the Lookupfield is also an id(int). The displaycolumn is a textfield. When I ad a record in the grid and select a textvalue from the dropdown of the lookupcombo and save the data is shows the id-value instead of the textvalue of the displaycolumn. How can I fix it to show the textvalue in the column?
See the following topic in the FirePower documentation under TwwLookupComboEdit
Embed into FirePower's Grids and RecordView components:
The component can be used in a TwwDataGrid component to replace any multiple-choice type of field in the grid, giving your end-users sophisticated lookup and fill capabilities within the grid or record-view components. In these situations, you may wish to have a descriptive field shown in the grid instead of the code. To accomplish this, you need to do the following.
Create a lookupfield in your dataset (See Delphi documentation on creating a lookup field - http://docwiki.embarcadero.com/RADStudio/Berlin/en/Defining_a_Lookup_Field)
Add this field to your grid's columns by dbl-clicking the grid and clicking the Add Field button, then selecting the newly created lookupfield. Then select this column.
Now define the column as a LookupCombo by doing the following. Either drop a new TwwLookupComboEdit into your form and assign the column's TwwGridColumn.CustomControl to this control, or set the TwwGridColumn.ControlType property to gdctLookupCombo.
Finally set the properties for your lookupcombo control or the ControlAttributes.LookupCombo if you are not using a custom control.