DataGridViewComboBoxCell::ObjectCollection::Add Method (Object^)

 

Adds an item to the list of items for a DataGridViewComboBoxCell.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
int Add(
	Object^ item
)

Parameters

item
Type: System::Object^

An object representing the item to add to the collection.

Return Value

Type: System::Int32

The position into which the new element was inserted.

Exception Condition
ArgumentNullException

item is null.

ArgumentException

The cell's DataSource property value is not null.

InvalidOperationException

The cell is in a shared row.

.NET Framework
Available since 2.0
Return to top
Show: