I want to override the behavior of a mouse click in the DataGridView header/column cell (top, left cell). That cell causes all rows to be selected. Instead, I want to stop it from selecting all rows. I see an event for RowHeaderSelect and ColumnHeaderSelect but not one for that top, left header cell.
Any ideas? Am I just being blind?
I know this is late but hopefully it will help someone. The code below worked for me in a similar scenario.
This is the dissasembled code of what happens when you click that cell:
In order for you to prevent this behavior you have 2 solutions:
Inherit your own datagrid and override
OnCellMouseDown
(something like this)You could gain some control over the click event using this hack :)