Kbase P25701: how to create a Multi-Select dynamic Browse
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/27/2003 |
|
Status: Unverified
GOAL:
how to create a Multi-Select dynamic Browse
FIX:
For browse widgets, the MULTIPLE attribute specifies whether the user can select multiple rows from the widget, or only a single row.
The MULTIPLE attribute is read-only for browse widgets so it has to be set before the browse is created.
Set the MULTIPLE attribute of the browse in the CREATE BROWSE statement to set this selection behavior for a dynamic browse widget.
Note that when an updateable browse is in edit mode, a cell has focus, all other selected rows are deselected.
Sample:
DEFINE VAR browse-hdl AS WIDGET-HANDLE.
DEF VAR whBrowse AS WIDGET-HANDLE NO-UNDO.
DEF VAR hColumn AS HANDLE NO-UNDO.
DEFINE FRAME f
WITH SIZE 80 BY 20.
DEFINE QUERY q1 FOR customer SCROLLING.
CREATE BROWSE whBrowse
ASSIGN
TITLE = "Dynamic Browse"
FRAME = FRAME f:HANDLE
QUERY = QUERY q1:HANDLE
X = 2
Y = 2
WIDTH = 74
DOWN = 10
SENSITIVE = TRUE
READ-ONLY = YES
MULTIPLE = YES
VISIBLE = YES.
OPEN QUERY q1 FOR EACH customer NO-LOCK.
hColumn = whBrowse:ADD-LIKE-COLUMN("customer.name").
hColumn = whBrowse:ADD-LIKE-COLUMN("customer.address").
hColumn = whBrowse:ADD-LIKE-COLUMN("customer.city").
hColumn = whBrowse:ADD-LIKE-COLUMN("customer.state").
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.