DataGridViewCellCollection.Insert(Int32, DataGridViewCell) Yöntem

Tanım

Belirtilen dizinde koleksiyona bir hücre ekler.

public:
 virtual void Insert(int index, System::Windows::Forms::DataGridViewCell ^ dataGridViewCell);
public virtual void Insert (int index, System.Windows.Forms.DataGridViewCell dataGridViewCell);
abstract member Insert : int * System.Windows.Forms.DataGridViewCell -> unit
override this.Insert : int * System.Windows.Forms.DataGridViewCell -> unit
Public Overridable Sub Insert (index As Integer, dataGridViewCell As DataGridViewCell)

Parametreler

index
Int32

yerleştirildiği dataGridViewCellsıfır tabanlı dizin.

dataGridViewCell
DataGridViewCell

Eklenecek DataGridViewCell öğesi.

Özel durumlar

Buna sahip DataGridViewCellCollection olan satır zaten bir DataGridView denetime ait.

-veya- dataGridViewCell zaten bir DataGridViewRowöğesine ait.

Açıklamalar

Denetime içeren satırı eklemeden önce koleksiyonu değiştirmek için DataGridView bu yöntemi kullanın. Bir denetime satırı eklediğinizde, içerdiği hücre sayısı her zaman denetimdeki sütun sayısıyla eşleşir, bu nedenle bu yöntem artık yararlı olmaz.

Şunlara uygulanır

Ayrıca bkz.