Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying a Table
Message
 
À
03/05/2001 15:11:51
Todd Wolfe
Certified Marketing Services
Kinderhook, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxWeb
Divers
Thread ID:
00502684
Message ID:
00503206
Vues:
24
>Maybe I am confused on how this works. I am opening a table. Scaning it by evaluating across the fields of the table and then down.
>
>My HTML looks like this
>
>=table=
> =tr= =td= Row 1 Col 1 =/td=
> =td= Row 1 Col 2=/td= &&& acrosss 40-50 fields
> =/tr=
> =tr= =td= &&repeat above for the next 1500 rows =/td=
> =/tr=
>=/table=
>
>Your example doesn't illustrate a need to move across the fields am I missing something here?

Your not really missing anything, my example only showed grabing the first imaginary field. There are two ways you could add TDs for each row in the table. One way is to hard code the tags with the known field names (not recommended) the other way is to do an afields() before the scan and traverse the array for each record setting your TD tags that way. Then if you wanted to get really fancy you could write a class that handles field widths and datatypes for your table structure and have it return an html string to fill a TR tag for any size table with any type of data. AFIELDS() loads an array with all the information you need to write such a method.

Using a for loop to traverse the fields while scanning 1500 records would be nearly a blink of the eye.

HTH
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform