DataGridViewComboBoxCell.ObjectCollection.Add(Object) DataGridViewComboBoxCell.ObjectCollection.Add(Object) DataGridViewComboBoxCell.ObjectCollection.Add(Object) DataGridViewComboBoxCell.ObjectCollection.Add(Object) Method

定義

將項目加入至 DataGridViewComboBoxCell 的項目清單。Adds an item to the list of items for a DataGridViewComboBoxCell.

public:
 int Add(System::Object ^ item);
public int Add (object item);
member this.Add : obj -> int
Public Function Add (item As Object) As Integer

參數

item
Object Object Object Object

物件,表示要加入至集合中的項目。An object representing the item to add to the collection.

傳回

插入新項目的位置。The position into which the new element was inserted.

實作

例外狀況

儲存格的 DataSource 屬性值不為 nullThe cell's DataSource property value is not null.

儲存格位於共用資料列中。The cell is in a shared row.

適用於

另請參閱