DataGridViewSelectedCellCollection.Insert(Int32, DataGridViewCell) Metod

Definition

Infogar en cell i samlingen.

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)

Parametrar

index
Int32

Indexet som dataGridViewCell ska infogas.

dataGridViewCell
DataGridViewCell

Objektet som ska läggas till i DataGridViewSelectedCellCollection.

Undantag

Alltid kastad.

Kommentarer

Den här metoden är inte relevant för den här klassen. Du kan inte ändra DataGridViewSelectedCellCollection klassen direkt. Om du vill lägga till en cell i DataGridViewSelectedCellCollectionanvänder du DataGridViewCell.Selected egenskapen .

Gäller för

Se även