DataGrid: How to know which column header is clicked?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a DataGrid with one table in its TableStyle collection. The
TableStyle collection contains a ColumnStyle of some columns with headers
being visible.

Is there a way to find out which column header is clicked other than
calculating mouse cursor's position and checking it against the header areas?

Thank you.
 
Hello Nad,

No, I don't know any other way of doing this. Thanks Microsoft, the grid has
a kind of HitTest function which determines what exactly is under the mouse
pointer.
 
Thanks Dmytro,
Good to know.

Dmytro Lapshyn said:
Hello Nad,

No, I don't know any other way of doing this. Thanks Microsoft, the grid has
a kind of HitTest function which determines what exactly is under the mouse
pointer.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]


Nad said:
Hello,

I have a DataGrid with one table in its TableStyle collection. The
TableStyle collection contains a ColumnStyle of some columns with headers
being visible.

Is there a way to find out which column header is clicked other than
calculating mouse cursor's position and checking it against the header
areas?

Thank you.
 
Back
Top