DataGrid: How to know which column header is clicked?

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.
 
D

Dmytro Lapshyn [MVP]

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top