- Home
- Forum
- ASP.NET Core - EJ 2
- Grid Export PDF functionality does not seem to work with rowtemplate
Grid Export PDF functionality does not seem to work with rowtemplate
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.
allowPaging="true" allowPdfExport="true" toolbarClick="toolbarClick"
toolbar="@( new List<object> {"PdfExport"})" queryCellInfo="queryCellInfo">
function toolbarClick(args)
{
var gridObj = document.getElementById("SocialMediaAccountDetails").ej2_instances[0];
if (args.item.id === 'SocialMediaAccountDetails_pdfexport')
{
var exportProperties = {fileName: "tweets.pdf"};
gridObj.pdfExport(exportProperties);
}
}
var count = 1;
function queryCellInfo(args) {
if (args.column.headerText == "Row Number") {
args.cell.innerHTML = count;
count++;
}
}
SIGN IN To post a reply.
2 Replies
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.rowTemplate="#rowtemplate" allowPaging="true" allowPdfExport="true" toolbarClick="toolbarClick"toolbar="@( new List<object>() {"PdfExport"})" queryCellInfo="queryCellInfo">function toolbarClick(args){var gridObj = document.getElementById("SocialMediaAccountDetails").ej2_instances[0];if (args.item.id === 'SocialMediaAccountDetails_pdfexport'){var exportProperties = {fileName: "tweets.pdf"};gridObj.pdfExport(exportProperties);}}var count = 1;function queryCellInfo(args) {if (args.column.headerText == "Row Number") {args.cell.innerHTML = count;count++;}}
Please close this item.
DR
Dhivya Rajendran
Syncfusion Team
August 19, 2019 12:18 PM UTC
Hi Ajit,
Thanks for contacting us.
We have already provided response for the query in forum #146757. Please check that forum for more information.
Regards,
R.Dhivya
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
AG ajit goel
- Aug 18, 2019 04:09 AM UTC
- Aug 19, 2019 12:18 PM UTC