Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Column Highlight
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00680566
Message ID:
00680634
Vues:
17
>>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.

It's in the run-time depending on the order. I don't think, it's a really good design idea. The usual practice here either show some sort indicator in the header (see Vlad's class in Download section here), or use color in the Header (this is that I'm using in my applications). Though, if you like, you can change color of the whole column.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform