Home All Groups Group Topic Archive Search About

Copy DataGrid Rows to Clipboard

Author
6 Mar 2006 3:08 PM
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.

Author
6 Mar 2006 3:43 PM
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

Show quoteHide quote
"Devlei" <dev***@eastcape.net> schreef in bericht
news:1141657715.392411.224940@i40g2000cwc.googlegroups.com...
> 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.
>
Author
7 Mar 2006 4:34 AM
Devlei
Thanks Cor

How do I get a Collection of currently selected rows?

Dave