Move xDataSet Cursor with DBComboBox change

Hi
I'm using xDataWebConnection + xDataWebClient + xDataWebDataSet + xDataWebSource
with in a webform

  • WebDBComboBox
  • WebDBEdit

Connection OK + initial display of value from xDataSource OK.
When I'm changing the item in list of WebDBCombox, several event are fired

  • WebDBComboBox = OnChange
  • xDataSet = AfterScroll
  • xDataSource= OnStateChage

But initial content of WebDBEdit isn't changed according to WebDBCombobox position regarding DB content as I was expecting, it looks like the xDataSet cursor.

Is there a way to force xDataSet cursor to move with such change in Combobox ?

Thanks

1 Like

Do you have a sample project reproducing the issue so we can better investigate the issue?

Hi Wagner
Not easy to prepare
But imagine a table exposed by xData with

  • id_country
  • country_name
  • iscountry_eu

On a webform with xDataDataSet + xDataDataSource I'm binding a WebDBComboBox on field "country_name" and a WebDBEdit on field iscountry_eu
When I change throught webform selection on WebDBComboBox , some events occurs but value of WebDBEdit is changed to present valye of "iscountry_eu" according to value of "country_name", it's stick on value of first entry

If not clear I will try to prepare a demo about

Thanks

I don't understand how TWebDBComboBox relate to the dataset scroll? It's just a component to show a text value. Can you please elaborate exactly about the steps to reproduce the issue?

Hi Wagner
as newbie for DataSet I think I was wrong about event.
I solved the "issue" by populating a WebCombobox by code enumerating the content of DataSet and then on change event I retrieve the selected value and search by moving inside DataSet the right line and the read the "associated iscountry_eu" value
Not sure it's the best way to process but it works minimizing the request to xData API.

Thanks again
Sylvain

I understand you are using the combo box as a way to locate a record in the dataset using that field?
In this case yes, you can do that.