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

Grid Export PDF functionality does not seem to work with rowtemplate

Thread ID:





146757 Aug 18,2019 04:14 AM UTC Aug 19,2019 11:43 AM UTC ASP.NET Core - EJ 2 1
Tags: DataGrid
ajit goel
Asked On August 18, 2019 04:14 AM UTC

I have the following code. The "Download PDF" button works but it returns only one "ID" column(which is a width=0 column). How can I make it honor the grid rowtemplate?
i am also not able to provide a running row number for a column with the Grid rowtemplate using the queryCellinfo event.
Please help.
<script id="rowtemplate" type="text/x-template">
                            <div class="card">
                              <div class="card-body">
                                <div class="timeline timeline-one-side" data-timeline-content="axis" data-timeline-axis-style="dashed">
                                  <div class="timeline-block">
                                    <span class="timeline-step timeline-step-sm bg-primary border-primary text-white">1</span>
                                    <div class="timeline-content">
                                      <div class="d-block h1 text-sm mb-0">${Text}</div>
                                      <medium><i class="fas fa-clock mr-1"></i>${CreatedAt}</medium>
                                      <a rel='nofollow' href="#">
                                        <img class="img-fluid" src="${MediaURLHttps}">
                          <ejs-grid id="SocialMediaAccountDetails" dataSource="@Model.Tweets" height="auto" rowTemplate="#rowtemplate"
                                    allowPaging="true" allowPdfExport="true" toolbarClick="toolbarClick" 
                                    toolbar="@( new List<object>() {"PdfExport"})" queryCellInfo="queryCellInfo">
                            <e-grid-pageSettings pageCount="10" pageSize="5" />
                              <e-grid-column headerText=" " width="0" field="Id" textAlign="Left" />

function toolbarClick(args)
var gridObj = document.getElementById("SocialMediaAccountDetails").ej2_instances[0];
if (args.item.id === 'SocialMediaAccountDetails_pdfexport')
var exportProperties = {fileName: "tweets.pdf"};
var count = 1;
function queryCellInfo(args) {
if (args.column.headerText == "Row Number") {
args.cell.innerHTML = count;


Balaji Sekar [Syncfusion]
Replied On August 19, 2019 11:43 AM UTC

Hi Ajit, 
Thanks for contacting Syncfusion support.  
We have validated your query while checking your code example we have found that you have used rowTemplate in grid column. Currently, we do not have support for pdf export with rowTemplate, because template has any html element or custom components, so it does not support PDF, so it is not feasible to export the template into PDF file.  
Please get back to us if you need further assistance.  
Balaji Sekar. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon