DataGridViewCellCollection.AddRange(DataGridViewCell[]) Yöntem

Tanım

Koleksiyona bir hücre dizisi ekler.

public:
 virtual void AddRange(... cli::array <System::Windows::Forms::DataGridViewCell ^> ^ dataGridViewCells);
public virtual void AddRange(params System.Windows.Forms.DataGridViewCell[] dataGridViewCells);
abstract member AddRange : System.Windows.Forms.DataGridViewCell[] -> unit
override this.AddRange : System.Windows.Forms.DataGridViewCell[] -> unit
Public Overridable Sub AddRange (ParamArray dataGridViewCells As DataGridViewCell())

Parametreler

dataGridViewCells
DataGridViewCell[]

Koleksiyona eklenecek nesne dizisi DataGridViewCell .

Özel durumlar

dataGridViewCells, null'e eşittir.

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

-veya-

içindeki dataGridViewCells en az bir değerdir null.

-veya-

içindeki dataGridViewCells en az bir hücre zaten bir DataGridViewRowöğesine ait.

-veya-

içindeki dataGridViewCells en az iki değer aynı DataGridViewCellöğesine başvurulardır.

Açıklamalar

Satırı denetime eklemeden önce hücrelerle doldurmak DataGridViewRow için DataGridView bu yöntemi kullanın. Satırı bir denetime ekledikten sonra, 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.