Listbox sort by column

Post Reply
User avatar
cdmmaui
Posts: 693
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong
Contact:

Listbox sort by column

Post by cdmmaui »

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
Colin Haig
Posts: 310
Joined: Mon Oct 10, 2005 5:10 am

Post by Colin Haig »

Darrell

Have a look at oLbx:aActions := aTags

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


Hope this helps

Colin
User avatar
cdmmaui
Posts: 693
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong
Contact:

Post by cdmmaui »

Hi Colin, thank you very much!!! That worked!
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Post Reply