I have my next form:
that is called frmNot
After clicking on the magnifying glass button, it sends me to another form that is a data catalog (frmCat) which, when clicking on any of them, generates the report. The question is that I open a form, which I do not want, I want to click on the row to open the report on the same form frmNot, but I do not want to be another. I have my next code inside the frmCat form.
private void btnSeleccionar_Click(object sender, EventArgs e)
{
frmNot log = new frmNot();
log.NumRef = dgvResultados.CurrentRow.Cells[1].Value.ToString();
String NO_REFEREN = dgvResultados.CurrentRow.Cells[1].Value.ToString();
log.Show();
log.txt1.Text = NO_REFEREN;
}
and similarly try the following code option:
private void dgvResultados_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
{
frmNot log = Owner as frmNot;
log.NumRef = dgvResultados.CurrentRow.Cells[1].Value.ToString();
String NumRef = dgvResultados.CurrentRow.Cells[1].Value.ToString();
String NO_REFEREN = dgvResultados.CurrentRow.Cells[1].Value.ToString();
log.Show();
log.txt1.Text = NO_REFEREN;
log.reportViewer1.Text = NumRef;
}
and in my frmNot I have my following code:
private void buscarfol_Click(object sender, EventArgs e)
{
frmCat log = new frmCat();
AddOwnedForm(log);
log.ShowDialog();
}
I hope you can help me thanks.