Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search through a grids columns
Message
De
19/11/2003 14:42:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00851475
Message ID:
00851595
Vues:
7
>How would I go about looking through each column of a grid to find a certain value. What I want to do is to use a loop to go through the columns but I am unsure how to code going from one column to another. Any suggestions?
>
>Thanks in advance
>Kelly

Don't loop through the grid, loop through the grid's source cursor instead.
e.g.
LParameters tuValue
Local lcCursor, ji
lcCursor=thisform.grid.RecordSource && if the cursor name is known, use that instead
Select (lcCursor)
For ji = 1 to FCount()
  If Type(Field(ji))=Type("tuValue") and Eval(Field(ji))=tuValue
    ** you found it
  EndIf
Next
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform