Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating a grid and a combo box with a foreign key
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00659857
Message ID:
00661548
Vues:
27
Nerissa,

>Could you please tell me the reason why my records are not automatically displayed on my combobox when I click on the page. I have to click my combo box once before seeing the records. I set my business object as 'Requery first time activated only'.

In VFP, when the data in a combo box's RowSource changes, you need to send a Requery() message to the combo box so it is updated accordingly. The best way to do this in your situation is to place code in the business object's PostRequeryHook() that sends a Requery() message to the combo box. For example:
This.Parent.MyComboBox.Requery()
>Also, for my parameterized view, as I enter
>"this.iclientID=v_clients.iclientID" in the prerequeryhook method, the fields for my business object are not displayed in the object list window. When I run my application, it indeed gave an "unknown member" error which is the iclientID.

If you set a breakpoint on this line, which iClientID can it not find...the iClientID property or the iClientID field in the view?

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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform