Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying Array Elements in Grid's
Message
De
30/04/1997 08:36:40
Scott Knight
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
 
 
À
28/04/1997 16:40:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Divers
Thread ID:
00029950
Message ID:
00030234
Vues:
42
>>I would like to know if it possible to display an array element description in a grid instead of a lookup table description. I have about 18-20 grids throughout my Visual FoxPro application each of which having to display english descriptions for underlying codes. I currently have to open an extra 35 files(lookup tabes) just to display the english. Their must be a more effiecient way to display this information via a grid. I was hoping I could have an array containing the desciptions and link the code to an array element instead of relating the parent table code to a child lookup table.
>>
>You can always :
>INSERT into mycursor FROM array ...
>Thisform.Grid.RecordSource="mycursor"

Edward,

I might be wrong but I think you may have misunderstood me. I probably wasn't very clear in my explanation. The above will show the contents of an array in grid which is not a problem.

What I have is a Parent table named "client". One of the fields in client is status. The status field contains a code.

1="Targeted"
2="Non-Targeted"
3="Adjusted"
4="Adjusted with Interventions"

I then have a grid on form which will display many clients. The probem is that the users do not want to see the 1,2,3,4 code in the grid column for each client's status. They need to see the corresponding english descriptions. I had handled this previously by creating alookup table and making parent(client) child(statdesc) relationship to get the english in the grid. This is a quick and easy solution for a small file with a couple of fields needing relationships. In reality I may have 40-50 fields spanned of several tables which equates to 40-50 additional open files. Something else to keep in mind is that all of these grids are read only which should make life a little easier.

I also considered changing the text box control in the column to be a popup and set the properties of popup to display the array elements. Is this correct/best way to do this or is their an easier solution.

Thanks


Scott k
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform