ShowColumns Property

Determines whether data is displayed in column-mode. Host-generated datagrid controls only.

object.ShowColumns = [boolean]

Where object is an object expression that evaluates to one of the objects in the Applies To list, and boolean is a boolean expression that evaluates to either True or False, as described in Settings.

Use

This property is only available for datagrid controls that have been generated from 5250 subfiles. It is not available for DataGrid controls that have been manually added in Designer.

Where possible, the Newlook recognition engine attempts to organize data in a grid control into columns. If columns are easily identified then the ShowColumns property defaults to True. Where the Newlook recognition engine cannot identify any logical columns in the data grid then the property defaults to False and columns are not displayed. Items that may affect the recognition engine's ability to detect columns include: column headers that do not line up logically with column data, differing number of columns per row, and attribute byte placement. It is possible to turn on column recognition, even if columns have not been automatically detected, by setting this property to True in Designer. In doing this, the recognition engine will attempt to organize the grid data into columns, adding additional columns where necessary to align the data vertically. If a column has been automatically generated, and does not contain any data, then Newlook will set the Visible property of this column to False.

To turn off the global automatic detection of grid columns go into Tools | Rules | Subfiles tab. Un-check the option to Automatically detect grid columns.

BE AWARE THAT:

If the ShowColumns property of a datagrid is set to False then any modifications you make to columns in the Columns collection editor will not be applied.

Setting

Description

True

Display subfile data in columns.

False

Display subfile data in a grid control without columns.

See Also

Columns property | Columns collection

Applies To

DataGrid control