Hi Everybody,
Thanks for your generous help, which provide me with a lot of insight in how to solve my problem. In my particular case, the cursor has filter on hence it will take a bit more effort in implementing the highlight mechanism.
David
>>Hi, I know how to highlight alternative rows in a grid by using grid.dynamicforecolor and recno(), but I am scratching my head in how to highlight every other two rows in a grid, e.g. I need to highlight row 1&2, 5&6, 9&10, etc in the grid.
>>
>>Any suggustion? TIA
>
>with no filter, no deleted, no index
>you can use recno()
>
>Then:
>
>CLEAR
>? "1-1"
>FOR RECNO=1 TO 10
> ? RECNO,BITTEST((RECNO-1)/1,0)
>NEXT
>
>? "2-2"
>FOR RECNO=1 TO 10
> ? RECNO,BITTEST((RECNO-1)/2,0)
>NEXT
>? "3-3"
>FOR RECNO=1 TO 10
> ? RECNO,BITTEST((RECNO-1)/3,0)
>NEXT
>
>
>with filter or deleted or index
>the calculation is the same, but it needs to use the order position.