Consultor Eletrônico



Kbase P13606: How to sort a SmartBrowser when clicking in the column label.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/11/2007
Status: Verified

GOAL:

How to sort a SmartBrowser when clicking in the column label.

FACT(s) (Environment):

Progress 9.x

FIX:

The following code should be added in the START-SEARCH trigger for the Browser and the ALLOW-COLUMN-SEARCHING property must set to true.

This code could be added in a super procedure if this behavior is needed in several browsers. If this is done, remember to add the option 'IN TARGET-PROCEDURE' for the 'setQuerySort' and 'openQuery' dynamic functions.

DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumn AS HANDLE NO-UNDO.

ASSIGN hDataSource = DYNAMIC-FUNCTION('getDataSource')
hColumn = SELF:CURRENT-COLUMN.

DYNAMIC-FUNCTION('setQuerySort' IN hDataSource, INPUT hColumn:NAME).

DYNAMIC-FUNCTION('openQuery' IN hDataSource).