Consultor Eletrônico



Kbase 16263: How to get the FIRST-COLUMN attribute of an updatable browse
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to get the FIRST-COLUMN attribute of an updatable browse

This Knowledge Base entry describes a way to get around
the problem of not being able to access the FIRST-COLUMN
attribute when using the browse in a non-updatable mode.

NOTE: this is expected behaviour which should have been
in the documentation for the FIRST-COLUMN attribute.
A bug entry has already been made for this.

To accomplish this, a trick has to be used. The following
will describe an example.

- Open a window and drop in the browse widget
- Choose your the fields to be included from the Column
Editor; designate one of them to be enabled (for instance
choose Cust-num, Name and City and make City enabled)
- For demo purposes drop a button on the window as well and
add the following code to the CHOOSE trigger:

BROWSE-1:READ-ONLY = FALSE.
Customer.City:READ-ONLY IN BROWSE BROWSE-1 = FALSE.
MESSAGE BROWSE-1:FIRST-COLUMN VIEW-AS ALERT-BOX.
Customer.City:READ-ONLY IN BROWSE BROWSE-1 = TRUE.

- In the local-initialize event procedure add the following
code after the RUN of the dispatch of the original event
procedure:

RUN dispatch IN THIS-PROCEDURE ( INPUT 'initialize':U ) .
BROWSE-1:READ-ONLY IN FRAME {&FRAME-NAME} = TRUE.

This will put the the updatable browse into an non-updatable
state again.

- Now run this procedure and press the button to show the
handle of the FIRST-COLUMN.

Progress Software Technical Support Note # 16263