Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make ordering in grid
Message
 
To
16/12/2003 11:59:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00858599
Message ID:
00859558
Views:
35
>Dear Mr. Nick
>
>How Can I Change Color In Grid, For Example:
>You had My Project Run Information Form In Grid There is a Field Called ExpDate, What I Need is If Expdate < System Date the Color of This Field Should be Change
>
>Thank You For Your Time

Hi Abedalrahim,

You can just add to your Grid.Init()
this.SetAll("DynamicBackColor", "IIF(expdate<DATE(), RGB(255,0,0),RGB(255,255,255)", "Column")
Or, you can download my GridHighlighter class from Downloads section, it has the support for the conditional highlighting too.

Drop GridHighlighter class on the form.
Set its .cHostname property to the name of your grid (i.e. grid1)
Set .lcustomcondition property to .T.
Set ccustomcondition property to:
expdate<date()
Add
this.Parent.gridhighlighter1.highlight_row()
to your grid.AfterRowColChange() method.

You are set. GridHighlighter provides much more options for coloring your grid.
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
Next
Reply
Map
View

Click here to load this message in the networking platform