I'm using TWebDBLookupComboBox to maintain a dataset field from a list of values of another dataset.
I configure component TWebDBLookupComboBox properly with DataSource and DataField properties with the datasource of the main dataset ans datafield with the field of the main dataset too.
And ListSource, ListField and KeyField properties with the datasource of the dataset with list and the field for display text and field for key value...
When i run my project, i see the correct item selected in the Combo... It display the text of the correct record of list.
But if i select another item from the list, then the field of main dataset is no updated.
The only way to update the field of main dataet is if i use the event OnChange of the TWebDBLookupComboBox and assign manually the field.
In other wods, it seems that this component TWebDBLookupComboBox only run correctly in the direction of DataField --> Selected Item of Combo but no in the reverse direction.
Do you know if there ara any problem in this component or i or am I doing something wrong.
Please look at the demo Demo\Basics\DBLookupCombo
In this demo I cannot see an issue with the latest version of TMS WEB Core, the datafield of the DataSet is updated when selecting a new item.
The first Lookup can only give Customer Dataset to the dsEdit state.
The value never changes.
The second Lookup changes this value but does not reflect the selected value.
You select Germany, and the value shown is France, by example.
In both cases the value in CUSTOMERS.CUSTOMER.ID is selected correctly.
Hm, I see that datasets in Web Core don't have a self reference, which happens to exist in the TAureliusDataset.
The key field should not be the id, but the object itself, because that's what you are setting in the data field. Thus, unfortunately it's not possible to use such lookups in web core. I'm afraid you will have to build the combo manually using a regular TWebComboBox.
Regarding your second question, you can use ListAsync to list all objects.