Sounds kind of interesting, and if you have to repeat the process but only if both buttons were pressed.
I would think button 2 is disabled until 1 is clicked, then when hit button 1 is disabled, button 2 enabled. When button 2 is clicked, button 1 is enabled, and button 2 is again disabled.
The alternative being that you would need to keep track of which row did not get second column filled in and figure out how you would handle that, Or just not add anything and move on, don't disable anything..
Of course make sure you subscribe to your event with each button :)
private void button1_Click(object sender, EventArgs e){
if (null != dgv1) {
dgv1.Rows.Add();
dgv1.Rows[dgv1.Rows.Count - 1].Cells[0].Value = "test name";
button2.Enabled = true;
button1.Enabled = false;
}
}
private void button2_Click(object sender, EventArgs e) {
if (null != dgv1) {
dgv1.Rows[dgv1.Rows.Count - 1].Cells[1].Value = "1111";
button2.Enabled = false;
button1.Enabled = true;
}
}