Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Color at my grid
Message
De
09/03/2006 16:04:43
 
 
À
09/03/2006 05:56:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01102695
Message ID:
01102904
Vues:
10
>hi all,
>any idea
>
>i put this code under at mygrid event inti, error message
>expretion is invalid.use avalid expression for dynamic back color property
>
>FOR EACH loColumn IN this.Columns
>	lcCS = 'this.' + loColumn.Name + '.ControlSource'
>	IF TYPE(EVALUATE(lcCS)) = 'N'
>		loColumn.DynamicBackColor = [IIF(EVALUATE(] + lcCS + [) < 10, RGB(225, 128, 128), RGB(128,255,128))]
>	ENDIF
>ENDFOR
>
>thanks
I don't know if this will work, but try
FOR EACH loColumn IN this.Columns
  lcCS = 'this.' + loColumn.Name + '.ControlSource'
  IF TYPE(lcCS) = 'N'
    loColumn.DynamicBackColor="IIF(EVALUATE('" + lcCS + "') < 10, RGB(225,128,128), RGB(128,255,128))"
  ENDIF
I changed the [] to ", not because there's anything wrong with using [] as text delimiters, but because my eye sees them as array subscripts. This way was easier for me to read.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform