Try to add to Grid.Refresh method:
oGrd.Column1.DynamicBackcolor=[IIF(discontinu, 12632256, 0)]
oGrd.Column1.DynamicForecolor=[IIF(Unit_price - Unit_cost > 5, 16777215, 0)]
>In the samples provided with VFP 6 we are shown how to dynamically alter the background and foreground colours of a grid so that rows in the grid can be a specific colour based upon a certain condition.
>This is shown in DynGrid.scx.
>
>How does one modify the background colour of an individual column cell.
>I've attempted lines like the following :
>
>oGrd.Column1.Text1.ForeColor = IIF(discontinu, 12632256, 0 )
>
>oGrd.Column.SetAll("forecolor", ;
> "IIF(Unit_price - Unit_cost > 5, RGB(255,255,255), RGB(0,0,0))", "Textbox")
>
>oGrd.Column.SetAll("forecolor", ;
> "IIF(Unit_price - Unit_cost > 5, 16777215, 0 ))", "Textbox")
>
>
>All are unsuccessful.
>Any Ideas on how to set the background and foreground colours for an INDVIDUAL grid cell conditionally based upon a table field value?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement