Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid (Again)
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00197687
Message ID:
00197719
Views:
24
>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
Map
View

Click here to load this message in the networking platform