Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid highlighting getting trouble
Message
De
28/03/2006 13:56:16
 
 
À
28/03/2006 13:55:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01108487
Message ID:
01108503
Vues:
16
>>>Hi all, im using the classic:
>>thisform.grid1.setall("DynamicBackColor", ;
>> "IIF(RECNO()%2 = 0,RGB(184,207,235), RGB(255,255,255))", "Column")
>>
>>but when end user changes order in table, it makes that rows with similar color be together, how can i fix this?
>>
>>thank you all.
>
>>If you use a view for your grid, it will still be the alternating colors. And that's assuming you recreate your view when you change the order.
>
>i'm using directly alias(), but if i got your point it means that use a view and recreate it every time that order had changed.
>
>thank you

Correct. The view, if you use an ORDER BY, will be in the correct order and the RECNO() will allow the alternating colors.

Another way if you don't want to use a view is to SQL-SELECT the RECNO()'s from your table into an array property and then you'd do an ASCAN() to find your recno and use the "%2=0" on the index into the array. Versions prior to VFP 9 this limits you to 65,000 records.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform