I am trying to connect the parent TCombobox to child TCombobox using the Livebindings in RAD Studio. Meaning, when I select a customer in the parent Tcombobox, the child Tcombobox will generate the jobs under the parent only.
I have tried some binding expressions as you can see in the screenshots below but no avail. I also included below my tables screenshots.
What I want to achieve is to limit the list of jobs with customer-related jobs only. The screenshot below highlighted in blue should be the ones in the dropdown only.
Any help would be greatly appreciated.
I want to conclude this question by answering my own question. I wouldn't get the answer if not for some nice people here willing enough to share quick help. Here's what I got:
I used the ClientDataSet Filtering here. First, I initialized the key field of my clientdatasetJob then set the range of filter by the value selected in the combobox.
cdsJob.IndexFieldNames := 'CustomerName';
cdsJob.SetRange([cmbCustomer.Text],[cmbCustomer.Text]);
You might wonder why same values given in the set range. Basically, I don't need the range but a single value only. I added as well the field CustomerName in the clientdatasetJob for my key field.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.