There's a nice article here for copying to Excel via the Clipboard (http://forums.infragistics.com/wpf/articles/xamdatagrid-copying-to-excel-via-the-clipboard.aspx).
The example clearly demonstrates copying a single cell, range of cells, or selected records. What I'm wondering is if anyone knows of a way to easily allow the user to select all cells for all records in the grid. I'm looking for something like a click in the upper left corner of the grid.
Thanks,
Steve
Hello Steve,
Basically this example copying all the cells of the selected records in the XamDataGrid.
If you want to export the whole grid, not just the selected cells, you can use this article also by Andrew Flick - http://forums.infragistics.com/wpf/articles/exporting-the-xamdatagrid-to-excel.aspx
The other option that you have is to add all the records in the selected items collection of the grid.
Something like:
xamDataGrid1.SelectedItems.Records.AddRange(xamDataGrid1.Records.ToArray());
Please let me know if you have any questions on this.
Regards,
Alex.
This doesn't work when the grid has Grouped fields.