How do I handle the click event of a row in a standarddata grid ?

  • Thread starter Thread starter neil rowe
  • Start date Start date
N

neil rowe

Hi all


How do I handle the click event of a row in a standard .net data grid on a
windows form ?

Regards


Neil
 
Hi,

Private Sub DataGrid1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.Click

Dim pt As Point

Dim hti As DataGrid.HitTestInfo

pt = DataGrid1.PointToClient(Cursor.Position)

hti = DataGrid1.HitTest(pt)

If hti.Type = DataGrid.HitTestType.RowHeader Then

MessageBox.Show("Row header")

End If

End Sub



Ken
 
Back
Top