Detect DataGridView Header Cell in CellClick Event

Gruff

Newcomer
Joined
Dec 14, 2006
Messages
7
Location
Scappoose, OR, USA
Hi there.

How can you detect whether a header cell has been selected in the 'CellClick' or CellContentClick events? I don't see a 'IsHeaderCell' Property.

I would like my code to ignore header cell selection in those events.

Thanks,

[Edit] Found it. "If e.Rowindex = -1 then Exit Sub" [/Edit]

~T
 
Last edited:
Back
Top