DataGridViewComboBoxCell.ObjectCollection.Insert(Int32, Object) DataGridViewComboBoxCell.ObjectCollection.Insert(Int32, Object) DataGridViewComboBoxCell.ObjectCollection.Insert(Int32, Object) DataGridViewComboBoxCell.ObjectCollection.Insert(Int32, Object) Method

Definition

Inserts an item into the collection at the specified index.

public:
 virtual void Insert(int index, System::Object ^ item);
public void Insert (int index, object item);
abstract member Insert : int * obj -> unit
override this.Insert : int * obj -> unit
Public Sub Insert (index As Integer, item As Object)

Parameters

index
Int32 Int32 Int32 Int32

The zero-based index at which to place item within an unsorted DataGridViewComboBoxCell.

item
Object Object Object Object

An object representing the item to insert.

Implements

Exceptions

index is less than 0 or greater than the number of items in the collection.

Remarks

If Sorted is false, then the index value represents the position at which the item value is inserted. If Sorted is true, then index is ignored and item is placed in the collection in a position determined by the sorting order.

Applies to

See also