## GridData.SetColumnsVisibility

### Introduced

v12.0 (2014)

### Description

Hides / shows a set of columns.

### C# Syntax

    GridData.SetColumnsVisibility( Object in_vCols, Boolean in_bVisible );

### Scripting Syntax

    GridData.SetColumnsVisibility( Columns, Visible );

### Parameters

Parameter | Type | Description
--- | --- | ---
Columns | Array of Long | Array of column indices to hide or show.
Visible | Boolean | Visibility flag. If True, specified columns become visible.

### Examples

#### Python Example

    import win32com.client

    from win32com.client import constants as C

    propName = "TheProperty"

    gridDataName = "TheGrid"

    siProperty = Application.ActiveSceneRoot.AddProperty( "CustomProperty", False, propName )

    gridData = siProperty.AddGridParameter(gridDataName).Value

    gridData.ColumnCount = 3

    gridData.RowCount = 3

    for row in range( 3 ):

    	gridData.SetRowLabel( row, "Row %d"%row )

    	for col in range ( 3 ):

    		if row == 1:

    			gridData.SetColumnLabel( col, "Col %d"%col )

    		gridData.SetCell( col, row, "%d,%d"%( col, row ) )

    hiddenColumns = [ 1 ]

    shownColumns = [ 0, 2 ]

    gridData.SetColumnsVisibility( hiddenColumns, False )

    gridData.SetColumnsVisibility( shownColumns, True )

    Application.InspectObj( siProperty )

### See Also

GridData.SetRowsVisibility