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.
Unfortunately, activation email could not send to your email. Please try again.

copy paste functionality

Thread ID:

Created:

Updated:

Platform:

Replies:

92510 Jan 19,2010 04:14 AM Feb 10,2010 10:18 AM ASP.NET Web Forms (Classic) 9
loading
Tags: Chart
a
Asked On January 19, 2010 04:14 AM

Hello,

Users for my apps wish to use the charts that i create in their presentations. In the past I wrote functionality to enable a user to copy the chart with a previous control and then they can paste it in a program of their liking (Word/Powerpoint/mail).

How would i best achieve the same user experience using Essential Chart?

Thanks
Ron

Senthil Ganesh K [Syncfusion]
Replied On January 19, 2010 09:53 AM

Hi Ron,

Thanks for showing interest in Syncfusion products.

Below mentioned code is about the export of chart to word document:


exportFileName = fileName + ".doc";
file = fileName + ".gif";
if (!System.IO.File.Exists(file))
this.ChartWebControl1.SaveImage(Server.MapPath(file));
WordDocument document = new WordDocument();
IWSection section = document.AddSection();
IWParagraph paragraph = section.AddParagraph();
paragraph.AppendText("Essential Chart");
paragraph = section.AddParagraph();
paragraph.ParagraphFormat.HorizontalAlignment = Syncfusion.DocIO.DLS.HorizontalAlignment.Center;
paragraph.AppendPicture(System.Drawing.Image.FromFile(Server.MapPath(file)));
document.Save(Server.MapPath(exportFileName), Syncfusion.DocIO.FormatType.Doc );


Similarly we can export the chart to pdf,Xls etc.

Could you explain the term previous control in your update?
Please explain the functionality that you have used for copying the chart and paste it in liking applications(word,Powerpoint) and let me know about the platform(whether Asp.net or windows),language preferred and product version.
These information will help us to provide you the solution at the earliest.

Regards,
Senthil Ganesh K.

a
Replied On January 19, 2010 10:37 AM

Thanks for the quick reply.

Before using Essential chart I used NPlot which is an opensource chart control. One of the methods in this control was CopyToClipboard which, who would have guessed, copied the control to the clipboard as a picture.

After this the user could paste from the clipboard in e.g. mail which could be notes or exchange.

i'm using winforms and vb.Net and just downloaded essential studio 7.403.0.20

once more...thanks,
Ron

Senthil Ganesh K [Syncfusion]
Replied On January 20, 2010 12:51 PM

Hi Ron,

Thanks for providing the information.

I have attached a sample in the below sample link.
Sample link:
http://help.syncfusion.com/support/Chart.Windows/F92510/main.htm

Step 1: Please run the sample.

Step 2:you can find the toolbar at the top.First click on the toolbar item 'Copychart'.

Step 3:After that click on the button'CopyClipboardImage'

Result:

The image of the chart will appear on the picturebox.

Then open the paint application and Use the shortcutkey for paste option(ctrl+v).

You can see the image of the chart is copied from the clipboard to the paint application.

Similarly, try this in mail application you are able to see the image copied from the clipboard.

Step 4: Stop the running sample.

Please let me know if this helps.

Regards,
Senthil Ganesh K.

a
Replied On February 2, 2010 10:05 AM

Thanks Senthil Ganesh and sorry for the slow response. The link provided in your mail appears not to be working, at least not for me. Could you give me an update?

Thanks,
Ron

Senthil Ganesh K [Syncfusion]
Replied On February 3, 2010 09:00 AM

Hi Ron,

Sorry for the inconvenience caused.
Here is the working link of the sample.

Sample link:
http://help.syncfusion.com/support/Chart.Windows/F92510/main.htm

Please follow the steps mentioned in the last update and let me know if this helps.

Regards,
Senthil Ganesh K.

Ronnie van der Pluijm
Replied On February 8, 2010 10:04 AM

Thanks Senthil Ganesh, this is indeed the functionality that I am looking for.
Is there a certain method I can call if I want to do this without using the toolbar? I would like to be to use this functionality behind my own context menu. That would probably also prevent copying the toolbar to the clipboard.

Thanks,
Ron

Senthil Ganesh K [Syncfusion]
Replied On February 9, 2010 07:11 AM

Hi Ron,

Yes it is possible to achieve the same functionality using context menu.

I have attached a sample in the below link.

Sample link:
http://help.syncfusion.com/support/Chart.Windows/F92510/main1.htm

Step 1: Please run the attached sample.
Step 2: Right click on the chart. Context menu appears With two menu items "CopytoClipboard" and "Clear".
Step 3: Click on the "CopytoClipboard" menuitem and then click on the button(copyClipboardImage).
As a result the image will appear on the picture box.
Step 4: By clicking the "clear" menuitem the image get clear.

You can copy the image to the mail application and paint application from the clipboard.

Please let me know if this helps.

Regards,
Senthil Ganesh K.

a
Replied On February 9, 2010 09:30 AM

This is exactly what i needed. Thanks for your support!

Senthil Ganesh K [Syncfusion]
Replied On February 10, 2010 10:18 AM

Thanks for the update.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;