Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Coloring
Message
From
27/06/2001 04:38:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/06/2001 04:18:34
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00524001
Message ID:
00524004
Views:
18
This message has been marked as the solution to the initial question of the thread.
>Hi Vlad,
>
>I was busy about another thing and just tried your Grid coloring codes in the FAQ session today, but it says:
>"Expression is invalid. Use a valid expression for DYNAMICFORECOLOR property."
>when I run the code, do you know why?
>
>Just using the same code from you:
>
>MyGrid.DynamicBackColor = "iif(recno('" + .parent.RecordSource +;
>"')=this.nGridRecNo," + allt(str(lnColor))+ "," + allt(str(.BackColor)) + ")"
>
>
>Jimi

Jimi,
MyGrid.DynamicBackcolor ? Is it a custom property ?
What does .parent.recordsource refer ?
Try :

MyGrid.SetAll('DynamicBackColor', ;
"iif(recno(this.Recordsource)=this.nGridRecNo," + ;
allt(str(lnColor))+ "," + allt(str(.BackColor)) + ")",'Column')

Assuming nGridRecNo is a custom property of grid.
Also would need some fix in a few other methods but I think they're there already.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform