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 屬性。

適用於

另請參閱