Consultor Eletrônico



Kbase P77191: Dyn: We can easily view/hide columns of a SDB after initialization.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   30/04/2004
Status: Unverified

GOAL:

How to change dynamic browse columns after the initialization.

FACT(s) (Environment):

Dynamics 2.1A

FIX:

Once a Smart Data Browser is initialized and its query is opened, there is no easy way to change its columns such as playing with its displayFields property.

However, it is very easy to hide or view some columns with the hideWidget() and viewWidget() client API's. Solution is then to define an SDB with all columns that might be necessary (at the master or instance level), then hide or view some columns by calling the hideWidget(<columnName>) or viewWidget(<columnName>) client API's.

Note that you did not have to develop these hideWidget() and viewWidget() API yourself. SmartDataBrowser's are in the visual class, so they *already* have a hideWidget() and a viewWidget() API. These API's are commonly called "client API's" in our jargon (white paper and doc). For a SDV or a SDB , these API's are even forward declared in SUPER so you can call them without using the DYNAMIC-FUNCTION() 4GL function.
=> see the complete list of API's in the include file {adm2/customsuper.i} that is put in all SDV/SDBsuper procedure's by the AppBuilder. Note that these API's also work for the WebUI.
For a viewer (that also belongs to 'visual') these API's hide or view individual widgets, but for the browse, they hide or view columns in the browse.