Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change forecolor in grid
Message
From
31/01/2002 14:54:30
 
 
To
31/01/2002 13:34:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00613552
Message ID:
00613620
Views:
11
Hello Peter.

I want to change the forecolor in a grid based on a criteria. The grid contains 5 column, the fifth column contains numbers between 1 to 5. The color changed based on the number
eg 1 - blue/white
2 - green/white
3 - red/white etc.



Suppose column5 is bound to a field called Field5 in an alias called MyAlias that is being used as the grid's RecordSource:

This code in the grid's Init():
This.Column5.DynamicForeColor = ;
  "IIF( MyAlias.Field5 = 1, RGB( 0, 0, 255 ), IIF( MyAlias.Field5 = 3, RGB( 0, 255, 0 ), RBG( 255, 0, 0 ) ) )"
Previous
Reply
Map
View

Click here to load this message in the networking platform