DataGridViewCellCollection.AddRange(DataGridViewCell[]) 메서드

정의

셀 배열을 컬렉션에 추가합니다.

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())

매개 변수

dataGridViewCells
DataGridViewCell[]

컬렉션에 추가할 DataGridViewCell 개체의 배열입니다.

예외

dataGridViewCells이(가) null인 경우

DataGridViewCellCollection을 소유하는 행이 이미 DataGridView 컨트롤에 속해 있는 경우

또는 dataGridViewCells의 값 중 하나 이상이 null인 경우

또는 dataGridViewCells의 셀 중 하나 이상이 이미 DataGridViewRow에 속해 있는 경우

또는 dataGridViewCells의 값 중 두 개 이상이 같은 DataGridViewCell에 대한 참조인 경우

설명

컨트롤에 행 DataGridView 을 추가하기 전에 이 메서드를 DataGridViewRow 사용하여 셀을 채웁습니다. 컨트롤에 행을 추가하면 포함된 셀 수가 항상 컨트롤의 열 수와 일치하므로 이 메서드는 더 이상 유용하지 않습니다.

적용 대상

추가 정보