Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19-05-2008, 21:57:11
Avatar de jcarballo
jcarballo jcarballo is offline
Buena Participación en el Foro
 
Registrado: abr 2004
Posts: 85
jcarballo Valoración +2
Predeterminado Re: error en datagrid

Buenas tardes Wolf!

Al parecer de acuerdo a lo que planteas la exepcion está dada porque al quedar sin rows el grid el valor de la propiedad CurrentRow es Nothing por lo tanto no puedes hacer referencia a la colección Cells. Si no existe una CurrentRow mucho menos puede tener celdas

Convert.ToString(dtgUsuario.CurrentRow.Cells(0).Value)

esto lo solucionas si pones esas cuatro lineas de código dentro del siguiente if:

If not dtgUsuario.CurrentRow Is Nothing Then
me.txb... = Convert.ToString ....
me.txb... = Convert.ToString ....
me.txb... = Convert.ToString ....
me.txb... = Convert.ToString ....
End If
__________________
Saludos,

Juan Carlos Carballo Quevedo
Responder Con Cita