AddItem Method

Adds a new row to the grid control.

Syntax

Public Sub AddItem(ByVal Item As String, Optional ByVal Index As Integer = -1)

Applies To

Grid Object

Parameters

The following parameters are available:

Parameter Description
Item String expression to add to the control. The string contains entries for each column on the new row, separated by tabs (vbTab or Chr(9)).
Index Zero-based index representing the position within the grid where the new row is placed. If Index is omitted, the new row is added at the bottom of the grid.

Return Type

None

Remarks

To remove rows, use the RemoveItem method. Alternatively, you may add or remove rows at the bottom of the grid by setting the RowCount property.

See Also

RemoveItem Method