共用方式為


DataGridViewSelectedCellCollection.Insert(Int32, DataGridViewCell) 方法

定義

將一個細胞插入收藏。

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

適用於

另請參閱