Page 1 of 1

DisableControls loses Master/Detail relationship

Posted: Tue 28 Jun 2016 15:11
by kstantonnw
Greetings,

I have a master/detail set up with IBCQuery (customers and their orders). When I call DisableControls and I programmatically move through the customer dataset, the current customer's respective orders are not retrieved in the detail (orders) dataset.

I was under the impression DisableControls only disabled screen/visual controls but retained the dataset relationship.

Am I doing something wrong here?

Thanks,
Kevin

Re: DisableControls loses Master/Detail relationship

Posted: Thu 14 Jul 2016 10:41
by ViktorV
Yes, you are right. When using master/detail relationship, after calling the DisableControls method, detail dataset data won't be updated until the EnableControls method is called. This is correct behavior, since the behavior in case when the DisableControls method is called at using master/detail relationship is implemented at the TDataSet class level, which TIBCQuery descends from. See more details how to use the DisableControls method in the Embarcadero documentation: http://docwiki.embarcadero.com/Librarie ... leControls

Re: DisableControls loses Master/Detail relationship

Posted: Thu 14 Jul 2016 14:45
by kstantonnw
I can understand your viewpoint but even Embarcadero, imho, has it wrong according to their first initial statement: "Disables data display in data-aware controls associated with the dataset." DisableControls should do just that and only that. Should have nothing to do with a dataset (master/detail).
Thank you for the reply!
Best Regards,
Kevin

Re: DisableControls loses Master/Detail relationship

Posted: Fri 15 Jul 2016 06:33
by ViktorV
Thank you for your interest to our products.
If you have any other questions, feel free to contact us.