Hello good day I have an existential question, I am filling a DataGrid
by means of a query
in C# windows forms
, Which shows me in a column several ID
, and by middle of the function CellDoubleClick
in the DataGrid I am showing a window in which I intend to show in a Textbox
the number of ID
that I select from the DataGrid only that I do not remember how to pass that value as a parámetro
to the new form
where is the textbox
, someone can help me, I'm stopped at this time. I leave the code of how I'm doing it.
Form1
private void dgvInfoNomina_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
try
{
frmTimbraNomina objTimbrar = new frmTimbraNomina();
objTimbrar.ShowDialog();
}
catch (Exception ex)
{
ex.ToString();
}
}
public string EnviarId(string nomina)
{
string IdNomina = "";
IdNomina = dgvInfoNomina.CurrentCell.Value.ToString();
return IdNomina;
}
Form2
public void MostrarId()
{
frmMuestraNomina objMostrar = new frmMuestraNomina();
objMostrar.EnviarId()
}