I don't know if this fits your needs fully but worth trying
Private clickedCell As DataGridViewCel l
....
Private Sub GridView_MouseD own(ByVal sender As Object, ByVal e As
MouseEventArgs) Handles GridView.MouseD own
Dim hit As DataGridView.Hi tTestInfo = DataGridView1.H itTest(e.X,
e.Y)
If hit.Type = DataGridViewHit TestType.Cell Then
clickedCell =
DataGridView1.R ows(hit.RowInde x).Cells(hit.Co lumnIndex)
Dim CurrentCell As DataGridViewCel l =
GridView.Item(h it.ColumnIndex, hit.RowIndex)
End If
End Sub
"Alex" <sa*****@gmail. comwrote in message
news:40******** *************** ***********@p10 g2000prf.google groups.com...
Hi,
I need an event to fire off when someone clicks anyplace within a
DataGridView row, but whether I use CellContentClic k or CellClick, the
event only fires off when clicking on the text within the row and not
anyplace within the row. Is there someway for the event to fire off
regardless of where they click in the row?
Here's a snippet:
Private Sub dgvStuff_CellCo ntentClick(ByVa l sender As
System.Object, ByVal e As
System.Windows. Forms.DataGridV iewCellEventArg s) Handles
dgvStuff.CellCo ntentClick
'' blah blah blah my code goes here
End Sub
Thanks --
Alex