General information
Category:
Forms & Form designer
>I am using the following code in the grid.refresh to have alternate white and green colors.
>
>THIS.SetAll("DynamicBackColor", ;
> "IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255) ;
> , RGB(0,255,0))", "Column") && Alternate white and green records
>
>It works fine most of the time. However, the Recno() is not always sequencial (ex.: if I access with a different order).
>Is it possible to set the dyanamicbackcolor without relying on the record?
Try using Mod( This.RelativeRow, 2 ) = 0. This way the relative row will always be tied to the grid, and not the actual data source..
Previous
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