>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