private void RecordsTable_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } DataGridView v = (DataGridView)sender; var x = (int)(v.SelectedCells[0].Value); var view = new ComplaintViewForm(x); view.FormClosed += (ee, ss) => { this.Enabled = true; }; this.Enabled = false; view.Show(); }
private void dgvRecords_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1) { return; } DataGridView v = (DataGridView)sender; var x = (int)(v.Rows[e.RowIndex].Cells[0].Value); using (var view = new ComplaintViewForm(x)) { view.OnComplaintChanges += View_OnMarkedSettled; view.ShowDialog(); } }