How to make new Sort by click on header?
Posted: Sat Apr 12, 2008 2:47 pm
Dear Antonio,
I saw this in testxbr3.prg and able to new sort when click on header coloumn. How can I make new sort in browse when click on header?
Which code to anable new sort?
Regards,
Dutch
I saw this in testxbr3.prg and able to new sort when click on header coloumn. How can I make new sort in browse when click on header?
Which code to anable new sort?
Regards,
Dutch
Code: Select all
static function RddBrwAllColsDlg
local oDlg, oBrw, oCol, cAlias := cGetNewAlias( "CUST" )
USE CUSTOMER NEW ALIAS (cAlias) SHARED VIA "DBFCDX"
SET ORDER TO TAG FIRST
GO TOP
MakeTotal()
DEFINE DIALOG oDlg SIZE 800,400 FONT WndMain():oFont
@ 10,10 XBROWSE oBrw ;
OF oDlg SIZE 380,180 PIXEL ;
ALIAS cAlias ;
AUTOCOLS AUTOSORT
XbrStyles( oBrw )
AEVAL( oBrw:aCols, { |o| o:bPopUp := { |o| ColMenu( o ) } } )
oBrw:lFooter := .t.
if !Empty( oCol := oBrw:oCol( "Salary" ) )
oCol:bFooter := { || nTotal }
oCol:lTotal := .t.
oCol:nEditType := EDIT_GET
oCol:bOnPostEdit := {| o, u, n| PostEditRDD( o, u, n ) }
endif
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED ON INIT oBrw:SetFocus()
(cAlias)->( dbCloseArea() )
return nil