DataGridViewRow.CreateCells 메서드

정의

행의 셀을 다시 설정합니다.

오버로드

CreateCells(DataGridView, Object[])

기존 셀을 지우고 셀 템플릿과 값을 설정합니다.

CreateCells(DataGridView)

기존 셀을 지우고 제공된 DataGridView 템플릿에 따라 셀의 템플릿을 설정합니다.

CreateCells(DataGridView, Object[])

기존 셀을 지우고 셀 템플릿과 값을 설정합니다.

public:
 void CreateCells(System::Windows::Forms::DataGridView ^ dataGridView, ... cli::array <System::Object ^> ^ values);
public void CreateCells (System.Windows.Forms.DataGridView dataGridView, params object[] values);
member this.CreateCells : System.Windows.Forms.DataGridView * obj[] -> unit
Public Sub CreateCells (dataGridView As DataGridView, ParamArray values As Object())

매개 변수

dataGridView
DataGridView

셀 스타일의 템플릿 역할을 하는 DataGridView입니다.

values
Object[]

다시 설정된 셀을 초기화하는 개체의 배열입니다.

예외

매개 변수 중 하나가 null인 경우

DataGridView에 이미 속한 행이 추가된 경우

또는

셀 템플릿이 없는 열이 추가된 경우

설명

이 메서드는 행의 DataGridViewCellCollection 를 지우고 매개 변수의 각 열 dataGridViewCellTemplate 속성을 사용하여 다시 초기화합니다. 따라서 행은 매개 변수에서 행의 모양과 동작을 dataGridView 채택합니다.

배열에 values 초기화할 셀보다 더 많은 요소가 있는 경우 추가 요소는 무시됩니다. 필요한 것보다 적은 요소가 있는 경우 일치하지 않는 나머지 셀은 기본 초기 값을 유지합니다.

추가 정보

적용 대상

CreateCells(DataGridView)

기존 셀을 지우고 제공된 DataGridView 템플릿에 따라 셀의 템플릿을 설정합니다.

public:
 void CreateCells(System::Windows::Forms::DataGridView ^ dataGridView);
public void CreateCells (System.Windows.Forms.DataGridView dataGridView);
member this.CreateCells : System.Windows.Forms.DataGridView -> unit
Public Sub CreateCells (dataGridView As DataGridView)

매개 변수

dataGridView
DataGridView

셀 스타일의 템플릿 역할을 하는 DataGridView입니다.

예외

dataGridView이(가) null인 경우

DataGridView에 이미 속한 행이 추가된 경우

또는

셀 템플릿이 없는 열이 추가된 경우

설명

이 메서드는 행의 DataGridViewCellCollection 를 지우고 매개 변수의 각 열 dataGridViewCellTemplate 속성을 사용하여 다시 초기화합니다. 따라서 행은 매개 변수에서 행의 모양과 동작을 dataGridView 채택합니다.

추가 정보

적용 대상