Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternating lines on a grid
Message
From
07/04/2000 01:05:06
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
 
To
07/04/2000 00:48:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00356606
Message ID:
00356670
Views:
17
Hi Mike,

I think what he wants is to alternate lines when an index is set. If a customer table is in last name order then your code might not work, because record numbers 2 & 4 might be sequential in the order, so they'd both have RGB(255,0,0). I think he might need to find the postion of the row relative to the top of grid and set the colour according to that ( I can't remember how to find the postion of a row relative to it's top ).

Gavin...

>>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?
>
>A little XMas cheer:
>
>grid.setall('DynamicBackColor', 'iif(mod(recno(), 2) = 1, rgb(255,0,0), rgb(0,255,0))', 'Column')
Previous
Reply
Map
View

Click here to load this message in the networking platform