Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternating lines on a grid
Message
From
07/04/2000 05:08:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/04/2000 01:09:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00356606
Message ID:
00356703
Views:
30
>>This only works if the table is in record number order - in his case it's not.
>
>Yep, my bad. This should work:
>
>this.setall('DynamicBackColor', 'iif(mod(this.activerow, 2) = 1, rgb(255,0,0), rgb(0,255,0))', 'Column')


With grid has focus this works but never do it :) As table grows this leads the user to take long coffee breaks (been there done that:)
This works faster with tables whose reccount() <= 65000 (for larger tables a cursor could be used instead):
* Grid.init
select recno() ;
   from (this.recordsource) ;
   order by myOrder ;
   into array ;
   thisform.aOrder  && A form or grid custom array property
this.setall("DynamicBackColor",;
   "iif(ascan(thisform.aOrder,"+;
   "recno())%2=0,rgb(0,255,0),rgb(255,255,0))","Column")
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform