>How can I change the color of column (in a grid control) with dynamicbackcolor? Is it possible?
>The ideia is change the column's color that represent the actual table's index.
>I was thinking about like this, but it doesn't work:
>
>This.Grid.SetAll("DynamicBackColor", ;
> "IIF(name='Column1',RGB(230,230,230),RGB(255,255,255))", ;
> "Column")
>
>
>Thanks!
Hi Juliano,
I am not sure about your condition: name='Column1'. What are you actually trying to do?
If you want to paint the records in different colors, then you need the column DynamicBackColor expression based on some condition from the field values, like
This.Grid.SetAll("DynamicBackColor", ;
"IIF(somefield < 0,RGB(230,230,230),RGB(255,255,255))", ;
"Column")
If you want the back color of one column to be different, just set grid1.Column1.BackColor = RGB(230,230,230) in the Property Sheet.
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