Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a Grid or column listcount()
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Is there a Grid or column listcount()
Divers
Thread ID:
00534130
Message ID:
00534130
Vues:
34
Hello,

I have a grid with 2 columns that change values depending on what options the end-user has chosen. What I need to be able to do is grab all of the values listed in the first column, and stuff them into a string (X,Y,Z) or an array for later use. Here is the code I have:

WITH ThisForm.cUtility.grdBoms.cGridList.Column1

FOR lnCount = 1 TO .ControlCount

lcAffectedBom = ALLTRIM(eval(.text1.ControlSource))

IF ISBLANK(vp_cAffectedBoms) OR ISNULL(vp_cAffectedBoms)
vp_cAffectedBoms = lcAffectedBom
ELSE
vp_cAffectedBoms = (vp_cAffectedBoms + "," + lcAffectedBom)
ENDIF
ENDFOR
ENDWITH

I tested this with a grid that had 5 different values in it - when it was done executing, lnCount was 3 instead of 5 and vp_cAffectedBoms was "Value1,Value1" instead of "Value1,Value2,Value3,Value4,Value5" as expected.

Is there any way to first accurately count the number of objects/fields/rows in the first column, and grab and store each value?

Thanks in advance!!!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform