Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text color in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00876786
Message ID:
00876894
Views:
15
>Erick,
>
>I'm having problems getting this to work. I have the following line in the Init event method of the grid: (dtext is a column in the grid rowsource cursor)
>
>This.Setall("DynamicForeColor", IIf("RUSH ASSIGNMENT" $ Upper(dtext), RGB(255, 0, 0), RGB(0,0,0) ),"Column")
>
>Running this results in error: Data type is invalid for this property
>
>Any suggestions?
>
>Thanks,
>
>-Steve

Steve, you have to watch the quotes. When you add Dynamic... expression programmatically it has to be a string:
This.Setall("DynamicForeColor", "IIF('RUSH ASSIGNMENT' $ Upper(dtext), RGB(255, 0, 0), RGB(0,0,0))","Column")
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform