pbVisible - cCJGridColumn
Specifies whether the column is visible in the grid
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Syntax
Property Boolean pbVisible
| Access Type | Syntax |
|---|---|
| Read Access: | Get pbVisible to BooleanVariable |
| Write Access: | Set pbVisible to BooleanVariable/Value |
Description
You can hide any column by setting its pbVisible property to False. You can also hide a column by dragging it off the grid. Columns can be un-hidden by selecting the Field Chooser (right-click on the header to invoke) and dragging it back in.
If pbShowInFieldChooser is set False, a hidden column will not appear in the Field Chooser. This allows you to create virtual columns. While these columns will never appear in the grid, you can still use their data to perform other operations.
Detecting Changes in Source Layout
When source code changes are made in a grid, the restored layout may interfere with those changes. When this happens, changes made to the grid and its columns will not appear because the old settings are being restored. The grid class attempts to recognize when such a change has occurred by checking if the number of columns has changed. If it has, the previous setting will not be restored. This only catches a small number of the possible changes and it is quite likely that it will not recognize that a change has actually occurred. When this occurs, it will appear that the grid is ignoring your source code changes. The number of columns that appear may be wrong, the ordering and size of the columns may be wrong and some of the grid alignment settings will be wrong.
If this happens, you must tell the system that the menu layout has changed. You can do this by changing (i.e., incrementing) the build number of the grid system by setting the piLayoutBuild property.
During development, it is probably best to disable the loading and saving of the grid's environment. Set pbRestoreLayout of the grid object to False to turn off restore layout for a grid, or set pbPreserveEnvironment of the cApplication object to False to disable restore layout for your entire application.