General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only