>hello,
>
>i have a simple grid on a VFP 8 form. i want the text in one column to appear in blue if the person is a male and red if a female. i am having a devil of a time trying to get it to work. first of all there is no error message, the text simply appears as before. secondly i am using the gridhighlighter object to highlight the row of the grid; could that be causing the dynamicforecolor event to not fire correctly?
>
>thnx,
>
>nancy
Hi Nancy,
If you have your Dynamic expression entered in the column Dynamic... property, then GHL just overrides it at runtime.
If you want to have multiple cells color-selected in one(or more) column while using GHL, you can simply override the column expression in GHL instance .onPostHighlight_Row() method like this:
lcHost = THIS.chostname
this.parent.&lcHost..Column2.DynamicBackColor = "IIF(yourrecordsource.Sex, RGB(255,0,0), RGB(0,0,255))"
Note also, that GHL works properly in VFP 8 with columns that have their .Sparse property set to false. :)
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