Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I dynamically change one cell in a grid?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00542012
Message ID:
00542021
Vues:
22
Look into "DynamicBackColor" of the column... You have a many approaches, but the simplest way would be...

In the init() method of the grid, something like

This.Column1.DynamicBackColor = "iif( some_field_value = 1, rgb( 255,0,0) , rgb( 0,0, 255)) "

where you could put your condition on whatever field, and the RGB() values you could get by using the color pallette and applying as a back color on a form or something to see what the values are... once found, apply them here...

If you want ALL columns to represent the colors, similar approach, but SETALL() method of the grid..

This.SetAll( "DynamicBackColor", "your iif statement like above", "column" )

and it will apply to ALL columns within the grid...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform