Hi!
I have code (see below) to highlight the entire row when any cell of the datagrid is clicked...but I also want to achieve the same thing when the user use the keyboard (tab) to navigate in the datagrid. Can anyone give me a hint on how to solve this ;-)
Private Sub DGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DGrid1.MouseUp
'code to select whole line from the datagrid when any cell is clicked
Dim pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = DGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
DGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column)
DGrid1.Select(hti.Row)
End If
End Sub
Regards Maria
I have code (see below) to highlight the entire row when any cell of the datagrid is clicked...but I also want to achieve the same thing when the user use the keyboard (tab) to navigate in the datagrid. Can anyone give me a hint on how to solve this ;-)
Private Sub DGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DGrid1.MouseUp
'code to select whole line from the datagrid when any cell is clicked
Dim pt = New Point(e.X, e.Y)
Dim hti As DataGrid.HitTestInfo = DGrid1.HitTest(pt)
If hti.Type = DataGrid.HitTestType.Cell Then
DGrid1.CurrentCell = New DataGridCell(hti.Row, hti.Column)
DGrid1.Select(hti.Row)
End If
End Sub
Regards Maria