DataGridViewSelectedCellCollection.Insert(Int32, DataGridViewCell) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將一個細胞插入收藏。
public:
void Insert(int index, System::Windows::Forms::DataGridViewCell ^ dataGridViewCell);
public void Insert(int index, System.Windows.Forms.DataGridViewCell dataGridViewCell);
member this.Insert : int * System.Windows.Forms.DataGridViewCell -> unit
Public Sub Insert (index As Integer, dataGridViewCell As DataGridViewCell)
參數
- index
- Int32
應該插入的索引 dataGridViewCell 。
- dataGridViewCell
- DataGridViewCell
要加入到 的 DataGridViewSelectedCellCollection物件。
例外狀況
總是被拋出。
備註
這個方法對這門課來說並不適用。 你不能直接更換 DataGridViewSelectedCellCollection 職業。 要在 中加入儲存格DataGridViewSelectedCellCollection,請使用屬性。DataGridViewCell.Selected