T
teo
hallo
In a DataGridView
how/where may I detect
the click on the header of a column
versus
the click on a cell "inside" the grid ?
I tried
by using the
DataGridView1_CellMouseClick event (and other)
and
by adopting the
CurrentCellAddress and CurrentRow.Index ways
but what I got was ALWAYS the index of the current blue selected cell
(I'd have expected a '0' value instead, or something that said to me
it was the click on the header row and not on a "good" rorw)
Here what I tried:
1)
'get cell indexes
Dim myCurrentCell As Drawing.Point =
DataGridView1.CurrentCellAddress
'get clicked row index
Dim myClickedRow As Integer = myCurrentCell.Y
'DataGridView1.CurrentRow.Index
2)
'get clicked row index
Dim myClickedRow As Integer =DataGridView1.CurrentRow.Index
In a DataGridView
how/where may I detect
the click on the header of a column
versus
the click on a cell "inside" the grid ?
I tried
by using the
DataGridView1_CellMouseClick event (and other)
and
by adopting the
CurrentCellAddress and CurrentRow.Index ways
but what I got was ALWAYS the index of the current blue selected cell
(I'd have expected a '0' value instead, or something that said to me
it was the click on the header row and not on a "good" rorw)
Here what I tried:
1)
'get cell indexes
Dim myCurrentCell As Drawing.Point =
DataGridView1.CurrentCellAddress
'get clicked row index
Dim myClickedRow As Integer = myCurrentCell.Y
'DataGridView1.CurrentRow.Index
2)
'get clicked row index
Dim myClickedRow As Integer =DataGridView1.CurrentRow.Index