Hello, good morning everyone, I have the following problem: in FORM_A I have a button from where I call FORM_B, which has a datagridview.
I need to doubleclick a row in the datagridview in FORM_B to pass those values to the textboxes of FORM_A, but it does not do anything about the code I have. This code I have in the grid:
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
frmMedicamentosPaciente frm = new frmMedicamentosPaciente();
DataGridViewRow row = dataGridView1.Rows[e.RowIndex];
//txtIdMedicamento.Text = row.Cells["idMedicamento"].Value.ToString();
//frm1.txtIdMedicamento.Text = row.Cells["idMedicamento"].Value.ToString();
frm.txtIdMedicamento.Text = row.Cells["idMedicamento"].Value.ToString();
}
and in FORM_A I have the textboxes as publics
Greetings to all and thanks in advance