0
DataGridView는 Form2에, 텍스트 상자는 form1에 있습니다. DataGridView 행 중 하나를 클릭하면 Form1의 texboxes에 DataGridView 복사본의 모든 셀을 표시하려고합니다. Form1의 texbox1 복사DataGridView 폼의 form2 중 하나의 셀을 form1의 텍스트 상자에 전달
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
Form1 fr1 = new Form1();
fr1.textBox1.Text = "123";
Form2.ActiveForm.Close();
}
아무것도 :
은 내가 Form2를이를 썼다 다음 '공개'로 텍스트 상자의 유형을 변경했습니다.도와주세요.
탱크 예를 들어. –
* _caller.textBox1.Text *를 작성 했습니까? – Steve