Hi,
I'm using Infragistics WPF 2014.2. I have a basic xamDataGrid showing a list of records that has a summary row populated with a few custom SummaryCalculators that do basic business logic. The xamDataGrid has a FieldLayoutSettings with AllowClipboardOperations="Copy" so users can copy the content of the grid to Excel or similar.
We've had a client request to make the summary row values copyable as well. Is there a straightforward way to do this which will have the same behaviour as the grid (i.e. select the row and copy) or automatically copy the values when all records are selected?
Thanks in advance,Jason
Hi Jason,
Currently the clipboard operations do not include the summary row. It is possible to include the summary row manually through the ClipboardCopying event and I have attached a sample to show this, though there are some limitations with this approach. First of which being that it does not use the display text of the summary cells since there is nothing publically exposed to get this. The code in the sample will also not take into account groupby records. Also the code is setup to only copy summaries if all the records are selected.
I recommend submitting this as a new product idea for the xamDataGrid. You can do this here: http://ideas.infragistics.com
Hi Rob,
Thanks very much for the example code. It works perfectly for our use case. I've refactored the code into a behaviour (using the System.Windows.Interactivity namespace) so that I can add this behaviour to other grids in our application as required.
I'll mark your post as the answer as well to help other members with the same problem.
Thanks again,Jason
Thank you Jason.
Regards,