select specific columns in DataGrid ?

Sep 28, 2009 at 7:38 PM

I'm exporting the contents of a WPFtk Datagrid to Excel using the following code, where currentGrid is a WPFTk DataGrid:

currentGrid.SelectionMode = DataGridSelectionMode.Extended;

currentGrid.ClipboardCopyMode =
ApplicationCommands.Copy.Execute(null, currentGrid);

String csvData = (String)Clipboard.GetData(DataFormats.CommaSeparatedValue);

my question is this, is it possible to select only certain  columns within the Datagrid? if so, how would I go about doing that?
That way I could copy the data from only those selected cells to the clipboard