Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change grid row forecolor to red/different
Message
De
13/03/2019 12:59:16
 
 
À
13/03/2019 12:31:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01667199
Message ID:
01667204
Vues:
66
>Hi,
>
>Something tells me that this question has been asked before, many times. But I don't remember the answer.
>
>I have a grid. And I want - dynamically - when a value of a record field changes, to change the entire row columns ForeColor to Red (or something different) so it stands out.
>
>For example, say the grid is bound to a cursor V_MATER and one of the fields is DEL_ITEM (default .F.). When the value of this field changes to .T., I want all columns to change the ForeColor to Red.
>
>TIA

Have you looked at the online help for the Dynamic___ properties of the Column object?
In a nutshell you assign to these properties a string that contains expression to be evaluated to return the ___ property value for that column.
oGrid = THISFORM.MyGrid
FOR C=1 TO oGrid.COLUMNCOUNT
  oGrid.COLUMNS[m.C].DynamicForeColor = "IIF(V_MATER.DEL_ITEM,RGB(255,0,0),RGB(0,0,0))"
ENDFOR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform