Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I dynamically change one cell in a grid?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00542012
Message ID:
00542021
Views:
28
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...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform