RemoveItem

Removes an item from a ListBox or ComboBox or from a Grid control. Named arguments are not supported.

Syntax

object.RemoveItem index

The parts of the RemoveItem method syntax are described in the following table.

Part Description
object Required. An object expression that evaluates to an object.
index Required. Integer representing the position within the object of the item or row to remove. For the first item in a ListBox or ComboBox or for the first row in a Grid control, index = 0.

Remarks

A ListBox or ComboBox that is bound to a Data control doesn't support the RemoveItem method.

The RemoveItem method for the Grid control, deletes the entire row specified. To clear data without removing the rows themselves, use the Clear method.