Consultor Eletrônico



Kbase P84541: How to change the format of a static browse column at runtime?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/15/2005
Status: Verified

GOAL:

How to change the format of a static browse column at runtime?

GOAL:

How to change the format of a static browse cell at runtime?

FIX:

Use a ROW-DISPLAY trigger that sets the appropriate format, for example:

ON ROW-DISPLAY OF myBrowse DO:
myField:FORMAT IN myBrowse = ''.
END.


Note that the format string supplied is actually applied on the cell level, not the column level. So the format may be different per displayed row by passing different format strings.

For a dynamic browse, this does not work. It is possible to change the format used in a column by modifying the format of the buffer-field itself (even if static) with the following:

BUFFER customer:BUFFER-FIELD("custnum"):FORMAT = ">>>>>9".
But note that this will only work if it is done before the column is added to the browse.