DisableControls loses Master/Detail relationship

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kstantonnw
Posts: 13
Joined: Mon 25 Feb 2008 17:22
Location: Oregon

DisableControls loses Master/Detail relationship

Post by kstantonnw » Tue 28 Jun 2016 15:11

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: DisableControls loses Master/Detail relationship

Post by ViktorV » Thu 14 Jul 2016 10:41

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

kstantonnw
Posts: 13
Joined: Mon 25 Feb 2008 17:22
Location: Oregon

Re: DisableControls loses Master/Detail relationship

Post by kstantonnw » Thu 14 Jul 2016 14:45

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: DisableControls loses Master/Detail relationship

Post by ViktorV » Fri 15 Jul 2016 06:33

Thank you for your interest to our products.
If you have any other questions, feel free to contact us.

Post Reply