How do you select all cells of the clicked column header?

Feb 13, 2009 at 6:30 PM
Would like to click on a column header to sort and also select all the column cell values
so I can copy and paste into excel. Any way to accomplish the above?
Thanks
Coordinator
Feb 14, 2009 at 3:02 PM
See this http://www.codeplex.com/wpf/Wiki/View.aspx?title=Column%20Selection&referringTitle=Tips%20%26%20Tricks.
Feb 17, 2009 at 7:10 PM

I have two grids on the same window and need to know which grid to use for copying the cells. From method
    selectColumn( object sender, RoutedEventArgs e )

 

 

How do you know which grid is it? 

This is the sender info I see 
System.Windows.Controls.Button}
base {System.Windows.Controls.Primitives.ButtonBase}: {System.Windows.Controls.Button}

Thanks

Feb 20, 2009 at 10:18 PM
I am using FindVisualParent to find the target DataGrid and use it a reference. That does it.