This is a migrated thread and some comments may be shown as answers.

Convert All RadGrids On Page To ONE PDF

4 Answers 73 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Johnathan
Top achievements
Rank 1
Johnathan asked on 19 Jan 2018, 12:22 AM

Hello friends - I am using the trial of Telerik and am interested to see if it will meet my need of converting 5 radgrids stacked on top of each other into ONE pdf.

My page set-up is like this

Grid1

Grid2

Grid3

Grid4

 

And I want my pdf to be generated just like this - no added buffering or whitespace.  How can this be done'?

4 Answers, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 23 Jan 2018, 02:25 PM
Hi Johnathan,

By RadGrid are you referring to RadGrid for ASP.NET AJAX? If so, you can take a look at our ClientExportManager example that demonstrates how to export HTML elements to PDF in a WYSIWYG manner. Keep in mind that this approach will export only the visible elements.
I've also attached a sample project similar to this demo but with multiple RadGrids. 

If you are not referring to RadGrid for ASP.NET AJAX export to PDF, I will kindly ask you to provider more information on your scenario and what you wish to achieve.

Regards,
Polya
Progress Telerik

0
Johnathan
Top achievements
Rank 1
answered on 23 Jan 2018, 06:30 PM

@Polya - Yes, that is what I was referencing, the RadGrid for Asp.net AJAX.

 

I see this .zip would work for a dynamically created radgrid but what about in my case where I already have the radgrids on the page?

They are named:

<telerik:RadGrid ID="gvOne" Font-Bold="True" AutoGenerateColumns="false" runat="server" CssClass="Grid"  AllowMultiRowSelection="True" >
<telerik:RadGrid ID="gvTwo" Font-Bold="True" AutoGenerateColumns="false" runat="server" CssClass="Grid"  AllowMultiRowSelection="True" >
<telerik:RadGrid ID="gvThree" Font-Bold="True" AutoGenerateColumns="false" runat="server" CssClass="Grid"  AllowMultiRowSelection="True" >
<telerik:RadGrid ID="gvFour" Font-Bold="True" AutoGenerateColumns="false" runat="server" CssClass="Grid"  AllowMultiRowSelection="True" >
<telerik:RadGrid ID="gvFive" Font-Bold="True" AutoGenerateColumns="false" runat="server" CssClass="Grid"  AllowMultiRowSelection="True" >

 

And as your example shows, I want them in the pdf one on top of another.

0
Johnathan
Top achievements
Rank 1
answered on 23 Jan 2018, 07:57 PM
@Polya - I follow your example now, but my grids show a lot of data that in a pdf will span multiple pages.  If I use this to export to pdf it will only export the data for one page - and will not export the radgrid(s) on the page.
0
Accepted
Marin Bratanov
Telerik team
answered on 24 Jan 2018, 02:06 PM

Hello Johnathan,

The example uses a server loop to allow for easy changing of the number of grids. Ultimately, RadClientExportManager works with the DOM in the browser, so it does not matter how the grids are created/declared.

To set where pages break, follow this article: https://docs.telerik.com/devtools/aspnet-ajax/controls/clientexportmanager/functionality/pdf-multi-page-export.

You can find attached an example. It still creates the grids programmatically for brevity, but this is not relevant.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PdfProcessing
Asked by
Johnathan
Top achievements
Rank 1
Answers by
Polya
Telerik team
Johnathan
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or