>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