AddCol Method

Adds a new column to the grid control.

Syntax

Public Sub AddCol(Optional ByVal Index As Integer = -1)

Applies To

Grid Object

Parameters

The following parameters are available:

Parameter Description
Index Zero-based index representing the position within the grid where the new column is placed. If Index is omitted, the new column is added at the right of the grid.

Return Type

None

Remarks

To remove columns, use the RemoveCol method. Alternatively, you may add or remove columns at the right of the grid by setting the ColCount property.

See Also

RemoveCol Method