private void button2_Click(object sender, EventArgs e) { if (dataGridView1.SelectedCells.Count != -1) { frmAccountEdit fm1 = new frmAccountEdit(); fm1.userID = dataGridView1.SelectedCells[1].Value.ToString(); fm1.Show(); } }
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.SelectedCells.Count != -1) { frmAccountEdit fm1 = new frmAccountEdit(); fm1.userID = dataGridView1.SelectedCells[1].Value.ToString(); fm1.Show(); } }