Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy + paste out of a Flex DataGrid control

Is there a way to select a single cell in a Flex DataGrid, and then either select the text inside of the cell, or select the entire cell for copy + paste? It doesn't even have to copy into an excel friendly format, flat text would be fine. So far, I have only been able to select an entire row, and that doesn't seem to copy very well. I am using a DataGrid to display an error log, and I would like to be able to Copy the stack trace information out and throw it in a bug report or an email.

Thanks.

like image 611
Rob Lund Avatar asked Nov 25 '09 22:11

Rob Lund


3 Answers

This works great for me: http://hillelcoren.com/2009/09/17/import-export-copy-paste-flex-datagrid/

like image 92
Mike Sickler Avatar answered Oct 15 '22 11:10

Mike Sickler


So after reading through the article Mike Sickler posted. I found some more posts on copying out of Flex (and Flash). See here and here. It looks like the best way is to create a hidden div on the page that you place your copied text into on Ctrl + C, and then putting that on the clipboard.

like image 1
Rob Lund Avatar answered Oct 15 '22 10:10

Rob Lund


Hans Muller has provided an excellent post and sample code on how to do this with the Spark DataGrid

http://hansmuller-flex.blogspot.com.au/2011/10/datagrid-support-for-copy-and-paste.html

like image 1
Ross Attrill Avatar answered Oct 15 '22 10:10

Ross Attrill