private void dataGridRules_CellContentClick(object sender, DataGridViewCellEventArgs e) { int selectedrowindex = dataGridRules.SelectedCells[0].RowIndex; DataGridViewRow selectedRow = dataGridRules.Rows[selectedrowindex]; int id_rules = Convert.ToInt32(selectedRow.Cells["id_rules"].Value); EditRules er = new EditRules(id_rules); er.Show(); }
private void btnRulesEdit_Click(object sender, EventArgs e) { EditRules er = new EditRules(1); er.Show(); }