Para poder seleccionar toda la fila de un grid al hacer click encima utilizaremos la siguiente función:
Private Sub DgUrls_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DgUrls.MouseUp
Dim pt As System.Drawing.Point
pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo
hti = DgUrls.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
DgUrls.CurrentCell = New DataGridCell(hti.Row, hti.Column)
DgUrls.Select(hti.Row)
End If
End Sub
Donde DgUrls es el nombre del datagrid
Los trucos Visual Basic.NET más vistos
Este truco ha recibido 52 votaciones| Nota media: 7Selecciona tu
Puntuación: