Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternating row colors in a grid.
Message
 
À
14/10/2000 11:55:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00429507
Message ID:
00429526
Vues:
15
>Can anyone give me a lead on how to alternate two colors in the rows of a grid, so it looks like the old style green-lined printer paper?


In Thread #401746 Message #402538 Mike said the following:
< Mike >
Yep, there's a solution kicking around, try this:

* Grid.init
select recno() ;
from (this.recordsource) ;
order by myOrder ;
into array ;
thisform.aOrder && A form or grid custom array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(0,255,0),rgb(255,255,0))","Column")
< /Mike >
You can also set the recordsource to a view sorted in the right order and look at even recno()'s.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform