Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid: ControlSource - column vs CurrentControl?
Message
 
 
À
13/12/2006 10:42:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01177136
Message ID:
01177180
Vues:
16
>>For some reason I don't like to use fields as RowSource. I prefer to use cursors, e.g. in form's Load (if Products table is not going to change in form's life-time):
>>select ItemCode, ItemDesc from products into cursor curProducts order by 1.
>>set rowsource type to be 2 alias curProducts. In combo's valid you may also replace InvDetail.ItemCode with the value of the combobox (in addition to updating the price).
>
>I think I have heard others say they prefer cursors too. Just trying to learn - do you have any particular reason why you don't like to use fields?
>
>Also, is there a difference between "6- Fields" and "2 - Alias" for RowSourceType? Say I have a free table, PRODUCTS.DBF. If I want a combo box to be directly populated with fields from this table, is there any difference between these two RowSourceTypes? In both cases, PRODUCTS refers to both the table's alias and its actual name...

I'm not really sure I have perfect valid reasons for preferring alias to fields as RowSourceType. If your Products table has ItemCode and ItemDesc as two first fields, then you can use alias Products as RowSourceType and there would not be any difference. Just set columncount to 2 in the combobox.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform