Consultor Eletrônico



Kbase P20545: 4GL. How to add and enable a column in a static browse?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   24/11/2003
Status: Unverified

GOAL:

How to add and enable a column in a static browse?

GOAL:

How to add a column in a static browse and set it as updatable?

FACT(s) (Environment):

Windows 32 Intel

FACT(s) (Environment):

Windows NT 32 Intel/Windows 2000

FIX:

If myBROWSE is the browse name you can use this code:

DEFINE VARIABLE CalcHnd AS HANDLE NO-UNDO.

/*add the column*/
CulumnHnd = myBROWSE:ADD-LIKE-COLUMN("customer.city") IN FRAME {&FRAME-NAME}.

/*make the column updatable*/
CulumnHnd:READ-ONLY = FALSE .

Please note that in order to make the column really updatable the browse should have at least one field (one column) defined as enabled. Otherwise you can turn off the read-only attribute of the new column, but you cannot edit it.
If in your browse there are no enabled field enable one of those.
In order to do it, go in AppBuilder double click on the Browse and select Fields. Select one of them and enable it by using the "Enable" Toggle box.
If you don't want the column to be really editable, turn on the read-only attribute of it in the main code session.