void BtnConcorrentesClick(object sender, EventArgs e) { if (dgvAcoes.Rows.Count == 0) { return; } int i = dgvAcoes.CurrentRow.Index; fObservacao frm = new fObservacao("Concorrentes", dgvAcoes.Rows[i].Cells["Concorrentes"].Value.ToString()); frm.ShowDialog(); }
void DgvAcoesMouseDoubleClick(object sender, MouseEventArgs e) { DataGridView.HitTestInfo hti = dgvAcoes.HitTest(e.X, e.Y); if (hti.RowIndex == -1) { return; } int i = hti.RowIndex; fObservacao frm = new fObservacao("Observação", dgvAcoes.Rows[i].Cells["Observação"].Value.ToString()); frm.ShowDialog(); }