:: Forum >>

Ctrl+c

is there no way to copy rows and paste then in another application, like Excel??

I was thinking in the traditional Ctrl+c and Ctrl+v. Can this be activated in some way?
Thx

Vicente
Friday, August 5, 2005
You would have to write Javascript to do this. I know I had to do it a couple of years ago for another application by creating a DIV, writing my information into the DIV then copying the DIV to the Clipboard.

Google for information on execCommand("Copy") and it should give you more to go on.
Jim Hunter
Friday, August 5, 2005
Right Jim. Thanks for your great advise. I finally wrote the following code.

<script language="JavaScript">

function ClipBoard(text)
{
holdtext.innerText = text;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}
</script>
, where text is src.getItemProperty("text"), sent in the "click" event on a given cell.

And, wherever in the HTML:
<TEXTAREA ID="holdtext" STYLE="display:none;">
</TEXTAREA>

I hope somebody else will find that useful.

Vicente
Monday, August 15, 2005
Glad that you were able to solve your problem. Thanks for posting your code, I think it will assist someone in the future.
Jim Hunter
Monday, August 15, 2005

This topic is archived.


Back to support forum

Forum search