Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column Data ForeColor
Message
 
 
To
28/10/2009 22:09:10
Paul Ong
Knights of Christ Foundation
California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01431831
Message ID:
01432152
Views:
61
>thisform.grid1.column2.DynamicForeColor = IIF(MOD(tbltest.nid,2)=0,'RGB(254,0,0)','RGB(255,255,255)')
>
>i put this code, in the init of the grid, afterrow and beforerow,
>
>i do note, that it takes effect only after you move thru the records and it inherents the last color on the next record before it shows its real color when you move away again
>
>>You have to set Dynamic* property only ones. Keep in mind that it has to be expression that will be evaluated later. If it's evaluated at the time >of assignment than it'll not be dynamic. Could you post related code from the Init?
>
>>But it doesn't seem to work in INIT, and its late on afterrow, beforerow properties? any idea?

Paul,

Your expression is incorrect. It should be
thisform.grid1.column2.DynamicForeColor = [IIF(MOD(tbltest.nid,2)=0,RGB(254,0,0),RGB(255,255,255))]
In your original expression you put quotes in the wrong places.

Also, you need to set it up only once (you can do it in grid's Init).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform