Question

I'm building an application using IW 8 and Delphi 7. Application is 3-tier.
1) on the app's datamodule I have several TClientDatasets and TDataSources associated(set on master-detail relationship)
2) on an IW form I have several TIWDBLookupComboBoxes with datasets pointed to datamodule datasources.

The problem I'm facing: when I select a value from one of the TIWDBLookupComboBoxes, the datasets don't react(I'm changing the index of the master dataset, so the detail dataset should also change). So I saved the clientdatasets to xml files and imported the data into a win32 application, set all the master details in the same manner, and voila - everything is ok.

So my question is: it seems that TIWDBLookupComboBoxes don't move the internal cursor of the datasets? If so, on the OnChange event of the TIWDBLookupComboBoxes, if I set the recno to what I want I'll have problems with forms rendering?

how can I solve this?

Was it helpful?

Solution

I resolved this by using simple IWComboBox components, and on the OnChange event setting up the RecNo property to the combobox's index+1(itemindex is 0 based). Other solution is to make a filter on the dataset with the combobox's value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top