Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary and foreign key fun with combos and grids?
Message
De
02/07/2002 01:04:32
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00673883
Message ID:
00674293
Vues:
21
>>Chris
>>I do this in the following way
>>column with combo, sparce .t. ( combo is shown only in active cell)
>>column bound=.f.
>>there is relation between parent table ( grid source and chield for rowsorce of the combo , ) In the combo gotfocus
>>I do
>>if not parent.key=chield.key or seek(parent.key,'chield','key')
>>this.displayvalue=chiled.filedtoshow
>>else
>>this.displayvalue=''
>>endif
>>In click of the combo is regular code
>>replace parent.key with chield.key in parent
>>It works for me for years
>>Best wishes, Vladimir
>>Setting bound to t cause problem , if chiled table has gaps in the keys
>Ok thanks Vladimir - I must have made it sound like the combo was in a grid column but it's not - it is just on the form... the grid and combo are also on a pageframe which adds a little to the problem - I am not sure it's refreshing correctly ever though I have tried thisform.pageframe.page3.cmbCompanies.refresh(), thisform.pageframe.refresh(), and thisform.refresh()
>
>I have done this also... thisform.pageframe.page3.cmbCompanies.value = alltrim(v
_companynames.co_name) and still I have nothing showing in the

combo...
>Thanks again - any other advice gratefully received

Try requery for combo instead of refresh. if you have any controlsources for combo, throw it away
Vladimir
MVP-2006-2011, PHD in Math and Physics ,
host of www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform