I am using the code listed on http://www.scottlogic.co.uk/blog/colin/2008/12/wpf-datagrid-detecting-clicked-cell-and-row/ for getting row value from datagrid, but I would like the same thing happening with mouse doubleclick event, not with mouse right click
the dep value after execution of this statement “DependencyObject dep = (DependencyObject)e.OriginalSource;” shows ’system.windows.controls.textblock’ for both events that when I doubleclick the row and when I right click the row
But after execution of following statement:
dep = VisualTreeHelper.GetParent(dep);
dep value is ‘null for mouse doubleclick event and
dep value is presenter(it’s parent element) for mouse right click event.
Can anyone help me? Thanks.