Problem updatind data field with TWebDBLookupComboBox

Hi,

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.

Thanks

1 Like

Hi,

Have you been able to review this problem ?

Thanks

Hi,

The responsible developer is currently out of office and will look at your question soon as possible.

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.

I've just modified the Demo\Basics\DBLookkupCombo, and I found the same problem.

I've modified the demo to ensure the DataSet uses Permanent TFields created at design time.

I've added a second TWebDBLookupComboBox that allows the user to select the COUNTRY by ID or by NAME.

I have very strange behaviors of these components all the time.

Can I send this code, with the problem, to this forum?

Yes you can attach a test project here.

DBLookupCombo_Demo.zip (8.2 KB)

Here is the Demo.

The problem is with both TWebDBLookupComponents.

His behavior is bizarre.
Actualize the Customer dataset, but do not change the value shown in the self or other components.

I think it's very common to use two TWebLookupComboBoxes to select a field value from a related table in the database.

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.

Thanks for the test project. It helped to trace & solve this issue. The next update will address this.

1 Like