CodePudding user response:
Foreach (DataGridViewRow row in this. DataGridView1. SelectedRows)
{
Int index=this. DataGridView2. Rows. The Add (1);
For (int I=0; i <2; I++)
{
This. DataGridView2. Rows [index] Cells [I] Value=https://bbs.csdn.net/topics/row.Cells [I] Value;
}
}
CodePudding user response:
Click on the click event written inside theForeach (DataGridViewRow row in this. DataGridView1. SelectedRows)
{
Int index=this. DataGridView2. Rows. The Add (1);
For (int I=0; i <2; I++)
{
This. DataGridView2. Rows [index] Cells [I] Value=https://bbs.csdn.net/topics/row.Cells [I] Value;
}
}
In the second click click events to write this
Foreach (DataGridViewRow row in this. DataGridView2. SelectedRows)
{
Int index=this. DataGridView1. Rows. The Add (1);
For (int I=0; i <2; I++)
{
This. DataGridView1. Rows [index] Cells [I] Value=https://bbs.csdn.net/topics/row.Cells [I] Value;
}
}