What I want to do is that when I click modify, send me another form to edit and the data appear in the textbox, but I do not know what I'm doing wrong ?. There is the datagridview code
private void dgvDocente_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
Agregardocente vern = new Agregardocente();
vern.txtnombred.Tag = Convert.ToInt32(dgvDocente.Rows[e.RowIndex].Cells["IdDocente"].Value.ToString());
Agregardocente verno = new Agregardocente();
verno.txtnombred.Text = dgvDocente.Rows[e.RowIndex].Cells["Nombre"].Value.ToString();
Agregardocente vera = new Agregardocente();
vera. txtapellidod.Text = dgvDocente.Rows[e.RowIndex].Cells["Apellidos"].Value.ToString();
if (dgvDocente.Rows[e.RowIndex].Cells["Cedula"].Value == null)
{
Agregardocente verc = new Agregardocente();
verc.txtcedulad.Text = "";
}
else
{
Agregardocente verc = new Agregardocente();
verc.txtcedulad.Text = dgvDocente.Rows[e.RowIndex].Cells["Cedula"].Value.ToString();
}
Agregardocente veres = new Agregardocente();
veres. txtespecialidadd.Text = dgvDocente.Rows[e.RowIndex].Cells["Especialidad"].Value.ToString();
Agregardocente verd = new Agregardocente();
verd.txtdirecciond.Text = dgvDocente.Rows[e.RowIndex].Cells["Direccion"].Value.ToString();
if (dgvDocente.Rows[e.RowIndex].Cells["Telefono"].Value == null)
{
Agregardocente vert = new Agregardocente();
vert.txttelefonod.Text = "";
}
else
{
Agregardocente vert = new Agregardocente();
vert.txttelefonod.Text = dgvDocente.Rows[e.RowIndex].Cells["Telefono"].Value.ToString();
}
}
ActualizarLista();
}