>On Grid1.init
>Create cursor temp (order C(254))
>
>On Grid1.header1.click
>
>Select temp
>ZAP
>
>SELECT * FROM orderlist INTO ARRAY aOrder ORDER BY date
>IF _TALLY<>0
>INSERT INTO temp FROM ARRAY aOrder
>ENDIF
>
>SELECT temp
>Go Top
>
>THIS.PARENT.PARENT.REFRESH()
Senna,
What does this really do ? Grid.recordsource = "temp" unordered at first and later order by date on header click ? If so there are shortcuts :
Create cursor temp (myorder C(254))
index on myorder tag myorder
this.recordsource = "temp"
set order to tag myorder
this.parent.parent.refresh
Cetin