Consultor Eletrônico



Kbase P82843: ADM2, How to change a column attribute in a smartDataBrowser ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/06/2004
Status: Unverified

GOAL:

How to change a column attribute in a smartDataBrowser ?

FIX:

In order to change a column attribute you have first to get the handle of the Browse from the SDB handle and after walking through its columns.  

Therefore, you can use a code like this:

DEFINE VARIABLE myBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE myColumn AS HANDLE NO-UNDO.

myBrowse = DYNAMIC-FUNCTION('getBrowseHandle':U IN h_sdbHandle).
myColumn = myBrowse:FIRST-COLUMN.

/* let say that you want to change the WITH of the 'city' column*/

DO WHILE VALID-HANDLE (myColumn):
IF myColumn:name = 'city' THEN DO:
myColumn:WIDTH-PIXEL = 25.
LEAVE.
END.
myColumn = myColumn:NEXT-COLUMN.
END.