Listbox sort by column

Listbox sort by column

Postby cdmmaui » Thu Sep 18, 2008 4:22 am

Is it possible to click on a column header and sort by that column for listbox? Using the example below if user clicks on Reference, Our Reference or A/R Code, listbox will be sorted by that column value. I would appreciate any help with this. Thank You.

REDEFINE LISTBOX oTblBox FIELDS paytempt->ref , ;
paytempt->ourref , ;
paytempt->arcode ;
ID 6000 ;
HEADERS "Reference", "Our Reference", "A/R Code" ;
FIELDSIZES 175 , 125 , 75 ;
SELECT txno FOR cTxno ;
ON DBLCLICK RopPay( oFld, oTblBox, .F., cTxno, @nAmount, @nTxtype, @aGet ) ;
OF oFld:aDialogs[1] UPDATE
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Colin Haig » Thu Sep 18, 2008 5:01 am

Darrell

Have a look at oLbx:aActions := aTags

aTags := { {|| codeblock for first header },;
{|| codeblock for second header}}


Hope this helps

Colin
Colin Haig
 
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Postby cdmmaui » Thu Sep 18, 2008 12:43 pm

Hi Colin, thank you very much!!! That worked!
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 107 guests