[DevExpress Support Team: this thread was cloned from A332: How to obtain the text of selected rows and copy it to the clipboard]
As an alternative to GridView.GetSelectedCells, is it possible to use SendKeys.Send("^©") to quickly copy a cell selection to the clipboard, in exactly the same way as pressing ctrl+c does on a gridview? I tried this but couldn't get it to work so just not sure if I was doing something wrong.
Thanks
How to obtain the text of selected rows and copy it to the clipboard
Answers approved by DevExpress Support
Hello Tristan,
I suggest you use the GridView.CopyToClipboard method instead of SendKeys.Send("^©") and GetSelectedValues. I'll update the article soon.
It seems that you can use SendKeys.Send("^©") . Note that c in the SendKeys.Send method should be in the lower case.
I've modified the How to copy selected rows to the clipboard example that illustrates the approach described in the How to obtain the text of selected rows and copy it to the clipboard KB article. Try the attached sample and let me know if this it works properly for you.