Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Howto color individual cells in a grid
Message
De
03/03/2005 10:43:44
 
 
À
03/03/2005 03:00:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
00992278
Message ID:
00992413
Vues:
22
>Hi Gunnar.
>
>The problem you are having is that the DynamicBackColor is evanuated in the context of the Grid, not the Column. There for "This" refers to the Grid, not the column you are looking at. If you reference the Field Name in the expression instead of This.ControlSource it should work fine. If you are trying to get each column to display a color based not on the record, bot on only the field in the column then something like this should work -
>
>Local loColumn
>For each loColumn in This.Columns
> If Type(loColumn.ControlSource) $ "NFIBY"
> loColumn.DynamicBackColor = "iif("+ loColumn.ControlSource +" < 0, Rgb(255,0,0), Rgb(255,255,255))"
> EndIf
>EndFor
>loColumn = .NULL.
>
>Ian Simcock.


Thank you Ian for your help. your solution goes along with Cetin's response, which i ended up using.

Thank you for your help!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform