Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requerying comboboxes upon form activation
Message
 
To
06/12/1999 09:05:04
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00299108
Message ID:
00299410
Views:
14
Rex,

>I have a combo on a form. The value I need is not in the combo. I open the entry form of the base table for the combo and add a new value. After saving I click on the original form, but the new value is not in the combo. How can I get the bizobj to requery so my combo will show new values?>

The best way to handle this is by means of a subject/observer design pattern (coming in the next version of the Framework). For now, you can do the following:

1. Set the business objects nRequeryType property to 0.
2. Place the following code in the Activate of the page on which the business object resides:

IF This.MyBizObj.cFormActivateID != Thisform.cFormActivateID OR ;
EMPTY(This.MyBizObj.cFormActivateID)
This.MyBizObj.Requery()
ENDIF

3. Make sure you place code in the business object's PostRequeryHook method to automatically requery the combobox. For example:

this.Parent.MyCombobox.Requery()

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