Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid highlighting getting trouble
Message
From
28/03/2006 13:56:16
 
 
To
28/03/2006 13:55:07
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01108487
Message ID:
01108503
Views:
18
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform