private void lnkAddSetting_Click(object sender, EventArgs e) { editSettingPassValue = -1; EditSetting frm = new EditSetting(); frm.FormClosed += Frm_FormClosed; frm.ShowDialog(); }
private void gridSettings_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && gridSettings.Rows[e.RowIndex].Cells[0].Value != null) { int selectedId = Convert.ToInt32(gridSettings.Rows[e.RowIndex].Cells[0].Value); //MetroFramework.MetroMessageBox.Show(this, "Selected Row: " + selectedId.ToString(), "Row Selected", MessageBoxButtons.OK, MessageBoxIcon.Information); editSettingPassValue = selectedId; EditSetting frm = new EditSetting(); frm.FormClosed += Frm_FormClosed; frm.ShowDialog(); } }