private void btnFEdit_Click(object sender, EventArgs e) { idToEdit = Convert.ToInt32(dataGridViewFlMain[0, dataGridViewFlMain.CurrentRow.Index].Value.ToString()); EditFl frm = new EditFl(); frm.FormClosing += new FormClosingEventHandler(this.Edit_FormClosing); frm.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { idToEdit = Convert.ToInt32(dataGridViewFlMain.Rows[e.RowIndex].Cells[0].Value.ToString()); EditFl frm = new EditFl(); frm.FormClosing += new FormClosingEventHandler(this.Edit_FormClosing); frm.Show(); } }