Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the backcolor in a Grid
Message
From
09/01/2002 13:33:17
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
 
To
08/01/2002 21:34:42
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00602300
Message ID:
00602612
Views:
29
Hi Wilfred:

I tried this code but got the following VFP message:

"Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property"

- Ravi

>Hi,
>It can be done by using "DynamicBackColor".
>e.g.
>WITH THIS.grid1
> FOR i=2 TO 8
> oCol=EVAL(".Column"+LTRIM(STR(i)))
> oCol.DynamicBackColor="IIF(ATC('BLOCK',T1.F1)>0,RGB(255,0,0),RGB(0,0,255))"
> NEXT
>ENDWITH
>
>Also see other "Dynamic" methods.
>
>:) Wilfred
>
>
>>Hi all:
>>
>>I have a grid displaying 8 columns. I would like to achieve the following:
>>
>>- columns 2-8 should display background color (say blue)
>>- if the text in any of the 2-8 columns is = "*BLOCK*", then, that cell in the grid should have a backcolor of (say red), else, the backcolor should be (say yellow)
>>
>>Any suggestions would be appreciated. TIA
>>
>>- Ravi
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Previous
Reply
Map
View

Click here to load this message in the networking platform