Copy DataGrid Rows to Clipboard

D

Devlei

How do I copy the contents of selected rows in a DataGrid (that is
bound to a Dataset via a DataView) to the Clipboard for pasting into
other applications - such as Excel? Doing the same from a TextBox is
easy via the TextBox.SelectedText property, but I can't find the
DataGrid property to do the same for the selected rows.
 
C

Cor Ligthert [MVP]

Devlei,

I would not know why this would go. A datagrid is not an dataformat, so it
can not be used on the clipboard.

I assume that you will first have to make an excel sheet from it using the
office development or office interop.

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top