Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternating lines on a grid
Message
De
07/04/2000 03:57:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00356606
Message ID:
00356695
Vues:
13
Hi Robin.

>>If your record order within a grid control is not in record number order is there anyway of alternating the background colour of each line in the grid? <<

Not easily. The only thing that I can think of (off the top of my head) would be to bind the grid to an updateable cursor or local view with an extra field called nRecOrder or something like that. After the cursor or view was populated and in the desired order, you'd have to initialize a counter to 0, scan it, increment the counter inside the loop, and replace nRecOrder with its value. Then, you could issue this command:

Thisform.MyGrid.SetAll("DynamicBackColor", "IIF(MOD(nRecOrder, 2)=0, RGB(255,255,255), RGB(0,255,255))", "Column")

Very clunky and definitely not a good idea for large tables, but it could work.

Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform