Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multicolumn list: can columns be named?
Message
De
07/11/2001 09:23:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/11/2001 19:19:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00578308
Message ID:
00578461
Vues:
13
>I have a multicolumn list: lList.
>lList.LIST(2,5) gives me the 5th column of the 2nd item listed in lList. Is there a way to name the columns so that it can be referred to by name, rather than by the column number? Something like: lList.List(2,custid).
>Thank you all!!!

Inge,
If you base the list on a rowsourcetype like alias, fields, SQL (my preference) then it'd be quite easy and yu could access to columns that are not part of list too. ie:
* Lisbox.init
lcSQL = 'select last_name-(', '+first_name) as name,emp_id as mykey,* '+;
 ' from employee into cursor crsMyList'
with this
 .RowSourceType = 3 && SQL
 .Rowsource = lcSQL
 .Columncount = 2
 .BoundColumn = 2
 .BoundTo = .t. 
 .columnWidths = '100,0' && Hide mykey
endwith
Now anytime you could use directly alias.fieldname. Say crsMyList.emp_id or crsMyList.address.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform