Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1531
Select all cells/records with a single user click
posted

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

Parents
  • 69686
    Suggested Answer
    posted

    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.

Reply Children