Solved

Problem with DisableControls...

Posted on 1998-09-02
2
143 Views
Last Modified: 2010-04-04
Hi!

I have two tables (tblScale and tblScaleCapacity). tblScaleCapacity has tblScale as it's master, connected through two fields. This works fine, tblScaleCapacity is updated if I change record in tblScale, BUT tblScaleCapacity is not updated when I've issued a tblScale.DisableControls call before I move the record-pointer.

Is there anyway I can override this? I want tblScaleCapacity to follow tblScale even if the controls are disabled...

//Daniel
(using Delphi2 and W95)
0
Comment
Question by:Dippen
2 Comments
 
LVL 7

Expert Comment

by:BlackMan
Comment Utility
That is the expected behaviour of Master/Detail relationship. If you call DisableControls, the detail will become out of sync with the master.
0
 
LVL 4

Accepted Solution

by:
binkzz earned 50 total points
Comment Utility
Change the tblScale OnChange procedure to call or make a TblScaleCapacity update.

Make the update so that if it still doesn't update properly, that the procedure enables the control, changes the data, and then disables the controls again. This should happen within a tenth of a second, and therefore the data shan't be in danger ;)

Hope this helps,

Binkzz
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now