Мой код-
public void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
Form2 f2 = new Form2(id);
f2.textBox1.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
f2.textBox2.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
f2.textBox3.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
f2.textBox4.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
f2.Show();
this.Hide();
}
public void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
Form2 f2 = new Form2(id);
f2.textBox1.Text = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
f2.textBox2.Text = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
f2.textBox3.Text = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
f2.textBox4.Text = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
f2.Show();
this.Hide();
}
мой гуй

Моя проблема в том, что когда я щелкаю по кортежу сетки данных, он не переходит к следующей форме.
Это просто замерзает.
редактировать-
вот как я заполняю сетку данных -
CheckBox[] Locations = { checkBox1, checkBox2, checkBox3 };
CheckBox[] Profiles = { checkBox4, checkBox5, checkBox6 };
string locs = string.Join(" or ", Locations.Where(c => c.Checked).Select(x => $"location = '{x.Text}'"));
string profs = string.Join(" or ", Profiles.Where(c => c.Checked).Select(x => $"profile = '{x.Text}'"));
MessageBox.Show(locs);
string query = $"select * from jobs where ({locs}) and profile in(select profile from jobs where ({profs}))";
OracleCommand comm2 = new OracleCommand(query, conn);
OracleDataAdapter MyAdapter = new OracleDataAdapter();//adapter acts as interface btw database and dataset(which is collectio of tables)
MyAdapter.SelectCommand = comm2;
DataTable dTable = new DataTable();//datatable represents a single table in database
MyAdapter.Fill(dTable);
dataGridView1.DataSource = dTable;
это может помочь при отладке. Так что мой запрос в основном возвращает строку кортежей, и я щелкаю по любой из строк, и он должен перейти к другой форме, где значения столбцов этой строки хранятся в текстовом поле второй формы.