- Code: Select all Expand view RUN
- SELECT myfile
DATABASE oDbfG
//create temporary index
oDbfG:CreateIndex( ,"NumberD","myfile->number", ,.T.,.T.)
oDbfG:CreateIndex( ,"Number" , "myfile->number", , ,.T.)
DEFINE DIALOG oDlg RESOURCE "Main" TITLE "Main" FONT oFont
oDbfG:GOTOP()
REDEFINE XBROWSE oBrw OF oDlg FONT oFuente COLOR RGB(0,0,0),RGB(226,241,254) ;
AUTOSORT DATASOURCE oDbfG;
FIELDS oDbfG:number
ID 101 HEADERS "Number" ;
SIZES 110
WITH OBJECT oBrw
:aCols[1]:cSortOrder := "number"
:aCols[1]:oDataFont := oFont
// Try this among dozen other combinations but will not work
:aCols[1]:bLClickHeader := { || nOrden++, IIF(nOrden>2, {nOrder:=0, oBrw:oCol("number"):cSortOrder=Nil }, ;
IIF(nOrden=1, oBrw:oCol("number"):cSortOrder="number", ;
oBrw:oCol("number"):cSortOrder="numberD" ) ) }
END
Ascending sort is working when clicking on header, but will not change to descending or back to none.
Thanks
Emiliano Llano Díaz