Lo que quiero hacer es que al dar click en modificar me mande a otro formulario para editar y que aparescan los datos en los textbox, pero no se que hago mal?. Alli esta el codigo del datagridview
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();
}