We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Copy/Paste question

I see that the grid has copy/paste methods which work great. But I am looking for extened functionality. Is there a way to copy/past outside a grid where the cell formatting is retained i.e. copy from the grid to the clipboard, then paste into a Word doc so that the font and text positions are retained. Thank you in advance. Tim

10 Replies

AD Administrator Syncfusion Team November 3, 2003 12:00 PM UTC

Currently, we only support two format types with copying and pasting multiple cells. One is Text and the other is our internal style format. We will expand these supported formats in future releases. But for now, if you want to support an additional format, you would have to implement it yourself. You would catch the ClipboardCopy event, and do your work there. The hard part of the task is not the grid work, but preparing a properly formatted data object in some form that Word would understand and accept.


IG iliyan georgiev March 22, 2004 06:05 AM UTC

You can simply get the active selection from the grid and generate one of the many formats that Word and Excel can understand, XML or HTML for example. It''s quite easy. I''ve done it and it works ;)


AS Anna Srinivasan November 7, 2006 01:14 PM UTC

Cany you please provide some samples on how you have implemented this or some code snippets?


AS Anna Srinivasan November 8, 2006 06:04 AM UTC

Dear Clay,

I have the similar requirement.



Is there a way to copy/past outside a grid(Multiple columns) where the cell formatting is retained i.e. copy from the grid to the clipboard, then paste into a Word doc so that the font and text positions are retained.


when user selects specific area and copies( ctrl+c) and then paste to any editor(word,notepad..), we need the format of the copied data to be retained. so we thought of a approach, where after the user copies the data(ctrl+c), we try to change the format of the data copied to the clipboard to RTF so that the format will be retained.

Please let me know your suggestions and the ways to do it.Expecting your reply.


AD Administrator Syncfusion Team November 8, 2006 07:05 AM UTC

Hi Anna,

We will work out for a solution and let you know the details soon. Thanks for being patience.

Best regards,
Haneef


AD Administrator Syncfusion Team November 8, 2006 09:09 AM UTC

Hi Anna,

The default support in a grid only copies simple text and cell style. Are you trying to do extra work to copy the richtext format in some way?

Here is a sample link that has another RTF cell. It lets you in-place edit teh text. In addition, it has a context menu that lets you copy and paste richtext from an actively editing cell. Maybe this will serve your purposes better.

http://www.syncfusion.com/Support/user/uploads/PasteinRichTextInPlaceCellContol_5a51719e.zip

Best Regards,
Haneef


AD Administrator Syncfusion Team November 8, 2006 09:09 AM UTC

Hi Anna,

The default support in a grid only copies simple text and cell style. Are you trying to do extra work to copy the richtext format in some way?

Here is a sample link that has another RTF cell. It lets you in-place edit teh text. In addition, it has a context menu that lets you copy and paste richtext from an actively editing cell. Maybe this will serve your purposes better.

http://www.syncfusion.com/Support/user/uploads/PasteinRichTextInPlaceCellContol_5a51719e.zip

Best Regards,
Haneef


AD Administrator Syncfusion Team November 9, 2006 04:06 AM UTC

Dear Haneef,

You have provided sample that copies the already exisiting RTF control. But in my requirement, we need to copy multiple columns from Grid(ctrl +c) and the grid doesnt contains any RTF controls.Ans once copied we need to retain the format of the copied portion and paste as it is to any editor.

Expecting your reply on this.



AD Administrator Syncfusion Team November 9, 2006 12:51 PM UTC

Hi Anna,

Sorry for the inconvenience caused.

Right now, we don't have any sample regarding RTF format issue. Please refer to the below forum thread for copying the custom object in Clipboard event.

http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=10877

Thanks for your patience.

Best Regards,
Haneef


AD Administrator Syncfusion Team November 10, 2006 05:34 AM UTC

Dear Haneef,

ThankYou very much for your pointer.

Anna

Loader.
Live Chat Icon For mobile
Up arrow icon