Итак, я хочу удалить / удалить выбранную сетку данных после того, как перейду к другой сетке данных
private void BtnRight_Click(object sender, EventArgs e)
{
foreach(DataGridViewRow item in dgAvailabe.Rows)
{
DataGridViewCheckBoxCell chkchecking = item.Cells[0] as DataGridViewCheckBoxCell;
if (Convert.ToBoolean(chkchecking.Value) == true)
{
int n = dgSelected.Rows.Add();
dgSelected.Rows[n].Cells[0].Value = item.Cells[1].Value.ToString();
dgSelected.Rows[n].Cells[1].Value = item.Cells[2].Value.ToString();
dgSelected.Rows[n].Cells[2].Value = item.Cells[3].Value.ToString();
dgSelected.Rows[n].Cells[3].Value = item.Cells[4].Value.ToString();
dgSelected.Rows[n].Cells[4].Value = item.Cells[5].Value.ToString();
}
}
}