I have a WPF DataGrid and I have subscribed to the PreviewMouseUp event of the Grid. Now since the grid contains records and column headers, I can click either of them and the PreviewMoudeUp event will get triggered. How do I know whether I clicked the column Header or clicked the Row? Basically I want to get the exact control (either column header or the content row) within the grid.
When I look at the sender, it always gives a reference to the Grid. But actually I want to know within the grid a reference to the header or row whichever is clicked and I need this information in the PreviewMouseUp event. Any help is appreciated.
Thanks,
Indira