Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using alternate backcolor in grid rows
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00769589
Message ID:
00769650
Vues:
17
Try this:
- Add a property "nActRec" to the form;
- add to the grid Refresh method

thisFOrm.nActRec=recn()
This.SetAll("dynamicbackcolor", ;
"IIF(thisFOrm.nActRec()%2 = 0,RGB(230,243,255), RGB(255,255,255))", ;
"Column")

>Hi:
>
>I am currently formatting my grid to display alternate backcolors in rows. My code in the grid's Init() looks like the ff:
>
>This.SetAll("dynamicbackcolor", ;
> "IIF(recno()%2 = 0,RGB(230,243,255), RGB(255,255,255))", ;
> "Column")
>
>However, this does not work when I am changing the sort order of the data in the grid. The backcolors are not alternated anymore. Obviously, this is because I am using recno() to determine the backcolor.
>
>I have been looking for ways other than recno(). The grid's ActiveRow property works as long as you have the focus on the grid. Anybody got a better idea?
>
>TIA,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform