I'm now going to do a bit of R&D. I don't know if you can use a TDBLookupComboBox and in a non-data-aware way for the value, but data-ware for the list. If I can, this will make things much easier.
...
Cool, this can be done with little fuss.
Steps:
- Remove the datasource and DataField property values from the TDBLookupComboBox.
- Use the KeyValue property in lieu of the Text property to access and set the chosen selection
Next up is to do some refactoring on the form code. It's all a bit mixed up at the moment. I want a clear separation between my user interface controls and the database component fields. I'm going to achieve this by creating an entity class which I can use to pass data between the Form and Datamodule (View and Model).

No comments:
Post a Comment