private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } ProfileInfo form = new ProfileInfo(list[dataGridView1.CurrentRow.Index]); form.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { dataGridView1.ClearSelection(); return; } ProfileInfo form = new ProfileInfo(list[Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value)]); form.Show(); }
private void openProfile_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count == 0) { MessageBox.Show("Выберите пациента"); return; } ProfileInfo form = new ProfileInfo(list[Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value)]); form.Show(); }