Kbase 21298: How To Sort By Column Label When COLUMN-SEARCHING Is Enabled?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/18/2004 |
|
Status: Verified
GOAL:
How to sort by a column header label when COLUMN-SEARCHING is enabled in the advanced properties of a browser?
FACT(s) (Environment):
Progress 9.1x
FIX:
The COLUMN-SEARCHING advanced property attribute enables a READ-ONLY browser to do a one-character deep search on a specific column of the browse. This allows the user to press any alphanumeric key to move the browse focus to the next row where the column begins with that number or letter.
When the COLUMN-SEARCHING advanced property attribute is checked, the START-SEARCH trigger is fired each time a column label is selected.
The following code example demonstrates how to sort a browse based on the selected column. ON START-SEARCH OF BROWSE-NAME
DO:
DEFINE VARIABLE cField AS CHARACTER NO-UNDO.
DEFINE VARIABLE hHandle AS HANDLE NO-UNDO.
ASSIGN hHandle = BROWSE-NAME:CURRENT-COLUMN
cField = hHandle:NAME.
QUERY BROWSE-NAME:QUERY-PREPARE("FOR EACH <table> BY " + cField ).
QUERY BROWSE-NAME:QUERY-OPEN().
END.
References to Written Documentation:
Progress Knowledge Base Solutions:
Solution 19096, "How-To Code a START-SEARCH Trigger for a Dynamic Browse"