次の方法で共有


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 プロパティを使用します。

適用対象

こちらもご覧ください