General information
Title:
Alternating colors in Grids
We use the following code to alternate the colors of the lines in a grid, i.e. Yellow, Green, Yellow, etc. It works great, until we sort the cursor using a temporary index. After re-ordering, RECNO() is no longer 1,2,3... but could be 2,4,3.. which messes up the alternating colors. Does anyone know of a way to dtermine the actual physical row number in the grid instead of using the record number from the cursor? This would guarantee the lines would alternate under all conditions. Or any other ideas to help make this work?
Thanks,
Bryan A. Jackson
for Rudy Nieves
THIS.SetAll( "DynamicBackColor", IIF( MOD( RECNO(), 2 ) = 0, RGB(187,217,168), RGB(255,255,190) )", "Column" )
Next
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