Consultor Eletrônico



Kbase P153769: How to hide columns in the UltraGrid
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/10/2009
Status: Unverified

GOAL:

How to hide columns in the UltraGrid

GOAL:

Where is the Hidden property for UltraGrid columns?

GOAL:

How to hide UltraGrid columns or make them visible at design time?

GOAL:

How to hide or show UltraGrid columns or at run time?

GOAL:

How to allow the user to display or hide columns in the UltraGrid

GOAL:

How to keep binding source fields from displaying in the UltraGrid

FACT(s) (Environment):

Windows
OpenEdge 10.2x

FIX:

Each band in the UltraGrid:Bands collection contains columns created from ProBindingSource fields (as well as any other columns the developer may add). Each band object has a Columns collection property. Each Column object in the collection has a Hidden property that may be set to True or False to display or hide columns.
Columns may also be displayed or hidden by the user at run time using the ColumnChooser control. ColumnChooser displays the name of each available column with a check box that the user can toggle to display or hide that column. When ColumnChooser is displayed, currently visible columns appear checked, and hidden columns appear unchecked. Each choice made by the user sets the value of the Hidden property in that column. The ColumnChooserDialog class wraps the ColumnChooser in a Windows Forms dialog for display. There are two methods to make the Column Chooser available to the user:

Set the UltraGrid:DisplayLayout:Override:RowSelectorHeaderStyle property to ColumnChooserButton. This will place a button in the band header above the row selectors that displays the ColumnChooser when clicked. The UltraGrid:DisplayLayout:Override:RowSelectors must be set to True for the button to be visible.
Call the ColumnChooserDialog:Show method at the desired point in the code to invoke the ColumnChooser without the use of the ColumnChooserButton.