Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid combobox
Message
De
23/03/2005 15:31:33
 
 
À
23/03/2005 11:30:51
Sid Meyers
Omegaware Consulting, Inc.
Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00998476
Message ID:
00998614
Vues:
25
I've tried for a couple days to get this combobox in a grid to work but just can't seem to get it.
.Text1.Controlsource = "(IIF( SEEK( tqDispatch.pcDrv_id, 'driver', 'driverid' ), driver.lastname , '' ))"
This makes the grid column read only. The only way you will be able to get the combo box to be updateable is if it is style=2-DropDown List because RaedOnly applies only to the portion of a control that accepts text. So if the control is a drop down list, you can still select a new value. If it is a drop down combo, you can't. I believe the class that you are using is a drop down combo.

If you must be able to add new entries to the combo on the fly, and you want to use this class, you need to denormalize the grid's recordsource to include the descriptive text and bind the grid column to that. The way the class works is that it updates the foreign key behind the scenes.

Why don't you grab the "How to put a combo in a grid" white paper and sample code from my web site. The working examples in the presentation should help you find a solution.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform