/// <summary> /// Opens a viewer to edit the income clicked on /// </summary> /// <param name="sender">Standard sender object</param> /// <param name="e">standard MouseEvent object</param> private void dgIn_MouseDoubleClick(object sender, MouseEventArgs e) { var grid = sender as DataGridView; if (grid.CurrentCell == null) { return; } using (var form = new IncomeViewer(grid.CurrentCell.OwningRow.DataBoundItem as Income)) { form.ShowDialog(); } DataBinding(); }
/// <summary> /// Opens a viewer to edit the income clicked on /// </summary> /// <param name="sender">Standard sender object</param> /// <param name="e">standard MouseEvent object</param> private void dgIn_MouseDoubleClick(object sender, MouseEventArgs e) { var grid = sender as DataGridView; if (grid.CurrentCell == null) return; using (var form = new IncomeViewer(grid.CurrentCell.OwningRow.DataBoundItem as Income)) { form.ShowDialog(); } DataBinding(); }