Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Your class multigrid
Message
From
16/08/2000 12:08:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
16/08/2000 11:55:12
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00405567
Message ID:
00405571
Views:
23
>I use your class in an application and i want to do an alternative backcolor (for exemple : one line black, an other one green, one other black ....).
>
>For give an exemple in the DynamicBackColor for a column :
>
>iif(MOD(recno,2)=1,rgb(255,255,255),rgb(0,220,0))
>
>But I can't do that because when do an order by with a colmun the cursor change so the almternative backcolor is wrong.
>
>Who can I do for have an alternative line and a selected line ?
>
>Thanks for your help


Galia,
Using both alternating color + selected color might be cosmetically strange. Supposing you still want it and assuming you have a recordsource with no more than 65000 records :
-Select grid recordsource recno() into an array.
-Set dynamicbackcolor based on ascan(aDummy,recno(grid.recordsource)%2
But class already plays with dynamicbackcolor. Thus you should combine DynamicBackColor expression.

As I remember reordering is done in header class (myheader.prg). There you can have code similar to :
lcCurrentOrder = key()
select recno() from this.Parent.Parent.Recordsource ;
 order by &lcCurrentOrder ;
 into array aDummy
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
Reply
Map
View

Click here to load this message in the networking platform