In my WPF-Application, I´ve got a lot of information in a DataGrid. Now, the step I have to do is that the user can export the data to a pdf.
Is there any simple way to export that? What is the best plugin for making pdf out of WPF/C#?
You can use the ReportViewer control which will let you save in multiple format (include .pdf).
Else, you can try some pre-made solution as this one : Export data from gridview to PDF in C#
But the best for me is to search more informations about how to use ReportViewer in C# ... it is a better solution for your problem.
Related
I am using the Devexpress DataGrid and PivotGrid controls. I need to implement methods that will export the reports to Excel.
The built in methods: ExportToXls allow me to export to excel, however I cannot find a way to include header and footer information to the excel file. Is there a way I can do this? Can someone direct me to some examples?
You can achieve such functionality using DevExpress PrintableComponentLink
This link has an example: http://documentation.devexpress.com/#windowsforms/CustomDocument3427
The idea is to add header and footer text (for example) to your datagrid.
Once you do that you can do: yourPrintableComponentLink.ExportToXls(yourStream);
I have done application using Extjs 4. I have requirement need to export grid data to excel. I have grid it contains many records, showing records by group headers/summary(collapse/Expand actions ). The same thing i need to export grid data to excel the same activity need collapse/expand in excel sheet. I have tried i am able to export grid records with group headers.summary to excel, cool it is working but collapse/expand is not happening in excel sheet. I need to implement this feature by writing a code. Can anybody tell me how to achieve this one? is it possible or not by using extjs? great appreciated. Thank you.
Something like this doesn't come out of the box. There is however some exporter from ExtJS to Excel: http://www.sencha.com/forum/showthread.php?136598-Export-store-to-Excel
We we internally do is generate our Excel backend with .NET so we have more control.
Currently I am searching for the best way for paginating the records in WPF datagrid.
I have found one best article which provide best way for paginating records in Silverlight over here.
See it provides also a fabulous demo.
Here is one screen shot.
But when I have trying it to implement it in WPF I could not implement it?
I could not found PagedCollectionView class and also could not found the alternative XAML code of the Silverlight code shows is below screen shot.
Could any one provide or suggest the best way for paginating the records in WPF
as like Silverlight?
You can grab the PagedCollectionView source code from here and compile it into your WPF project. I've done this for a WPF project in the past and it works just fine. However, you won't have the supporting types like DataPager, but it's easy enough just to write your own or throw some buttons on your view that page through the collection.
WPF DataGrid doesn't come with pagination by default. You have to have your own custom implementation. Here is a sample. The sample implements First/Previous as ViewModel commands, however I would advise you to move these commands as part of the control and make a custom DataGrid control that you can reuse across application.
I have a shared COM AddIn (not VSTO) for excel 2003, now I want to add a ribbon tab to support excel 2007.
I did some research online.
know that I need reference 2007 PIA, implement
IDTExtensibility2, IRibbonExtensibility in my connection
and IRibbonExtensibility has only one method string GetCustomUI()
string IRibbonExtensibility.GetCustomUI(string RibbonID)
{
return Properties.Resources.Ribbons;
}
I add ribbons.xml in resources, ribbons.xml is as follows:
Not sure if this is the good/right way to do.
I want to customize like add icon to button, largeimage, smallimgae, connect command to button, etc.
I feel in xml, it is hard to do this.
There must be better way to achieve this, please let me know how
thanks
Nope, that's about it when doing a shared addin without vsto.
You MIGHT be able to create a VSTO addin, setup the ribbon using that project, then extract just the ribbon control files and move them to youre shared add in.
In that case, for your GETCUSTOMUI method, you'd have to call the ribbon control to render it's XML manually and pass that on through. I experimented briefly with that several months back but other things came up and I had to leave it.
I have a problem. I want to save a XAML state into a file, or something like this. I developed a Silverlight version of PowerPoint, and now i want to save my presentation, but i don't know how...i'm using Silverlight 3 beta(if helps)...
I would like to allow users to upload their photos, music and video file somewhere.....where and how can i do this?
Thanks,
Andrei.
Well, that's a toughy. WPF has the Xaml Writer which can send that state out. Silverlight doesn't :(
What you're doing sounds a lot like Mike Harsh's Silverlight 3 sample. His source is available; Maybe that will provide a suitable approach.
I solved the problem by saving data in XML files. When i want to recreate the state of the app i set all the parameters from my XML file.