In project there is a DataGridView.
I have a little bit of code that I which displays information based on
the cell that was clicked.
My problem is how to detect if the user clicked on a column or row
header (anything other than a cell).
All this is tied to the 'dataGridView1_ CellClick' method, and I'm using
the HitTest to attempt to detect what the user clicked, but all I'm
getting is 'TopLeftHeader' when the user clicks a cell and 'None'
everywhere else.
<code>
DataGridView.Hi tTestInfo htest = dataGridView1.H itTest(e.Column Index,
e.RowIndex);
MessageBox.Show (htest.Type.ToS tring());
</code>
Can anyone help me out?
Thanks
I have a little bit of code that I which displays information based on
the cell that was clicked.
My problem is how to detect if the user clicked on a column or row
header (anything other than a cell).
All this is tied to the 'dataGridView1_ CellClick' method, and I'm using
the HitTest to attempt to detect what the user clicked, but all I'm
getting is 'TopLeftHeader' when the user clicks a cell and 'None'
everywhere else.
<code>
DataGridView.Hi tTestInfo htest = dataGridView1.H itTest(e.Column Index,
e.RowIndex);
MessageBox.Show (htest.Type.ToS tring());
</code>
Can anyone help me out?
Thanks