Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difficulty requerying combo boxes
Message
 
To
28/12/1998 09:36:32
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00170740
Message ID:
00170779
Views:
21
Roy,

>I am having difficulty in getting my combo boxes to populate on a nolist form. I am using a single bizobj to open all views - one to manipulate, the other three just populate the comboboxes and are lookup only. Initially, I turned off the NoDataOnLoad checkbox on the lookup views and everything was OK until I found I was getting deleted records in the comboboxes.>

>I turn the NoDataOnLoad back on but I cannot get the Combo to requery or populate the view (there is no view parameter). The requery call runs (tried in form.activate()) and I can step through it but the views and the combos do not populate...>

The business object's Requery() method only requeries the InitialSelectedAlias. This is by design, since the Framework should not assume that all associated lookup tables should be requeried at the same time. It provides finer control over view requerying.

For example, if you have a combobox on page 2 of a form, you really don't need to requery the combobox's associated view until the user clicks on page 2. This delayed requery ("just in time" data fetching) helps speed the instantiation of forms and keeps network traffic to a minimum.

That said, if you *do* need to requery the lookup views at the same time the business object is requeried, you can simply put discrete commands to requery the views in the business object's PostRequeryHook(). For example:

REQUERY('v_view1')
REQUERY('v_view2')

As its name suggests, PostRequeryHook() is executed each time the business object is Requeried.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform