Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/05/2009, 08:45
Trulala de cordoba
 
Fecha de Ingreso: octubre-2000
Mensajes: 1.692
Antigüedad: 23 años, 6 meses
Puntos: 19
Respuesta: Ayuda con datagridview

Lo que tenes que hacer es usar el evento del datagridview que se ejecuta cuando haces clic o doble clic en cualquier celda, algo como esto:

Código:
Private Sub DataGridView_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView.CellContentDoubleClick
  Dim CellValue As String = DataGridView.Rows(e.RowIndex).Cells("NombreColumna").Value
End Sub

O...

Private Sub DataGridView_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView.CellContentDoubleClick
  Dim CellValue As String = DataGridView.Rows(e.RowIndex).Cells(0).Value
End Sub
Fijate que:
Dim CellValue As String = DataGridView.Rows(e.RowIndex).Cells("NombreColumna ").Value

Lo que hace es guardarte el valor de una determinada columna y despues se lo podes asignar a un textBox o label
http://msdn.microsoft.com/es-es/libr...gs(VS.80).aspx

Espero te sirva
__________________
PD: Con amor, fe, amor a Dios y amistad podemos hacer un mundo mejor!!!!