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.
This works great for me: http://hillelcoren.com/2009/09/17/import-export-copy-paste-flex-datagrid/
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With