Exporting WinForms FlexGrid to PDF

When end users are working on data-intensive applications, they may need to take a snapshot of their data to preserve a particular view or set of data. One way to accomplish this is to export the grid's view to PDF once it has been sorted and analyzed. The following sample shows how to use the C1Pdf method to export C1FlexGrids to pdf files. The sample marks selected rows and columns as break points, then breaks the grid into several images and renders the images into a C1PdfDocument. The number of rows and columns per page determine the zoom factor, which is calculated automatically. Here's a screenshot of the sample in action: And here's a screenshot of the resulting output in PDF: You can download C# and VB.NET versions of the sample here.


GrapeCity Developer Tools
comments powered by Disqus