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

PDF Export Automatic Filename

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 05 Mar 2018, 03:55 PM

We have an app that is over 1000 pages and many of those screens have grids with the PDF Export option enabled.  We have found that when we don't specify a filename, it automatically uses the Tile Tag of the page.  So this:

<title>Issue Analysis</title>

Becomes Issue__Analysis.pdf

That has worked out fine for several years, but recently we have added a bunch of translations to the system and that title tag becomes this:

<title><%= Utilities.getTranslation("Issue Analysis", "IssueAnalysis", "globalRes") %></title>

Apparently when we export now, instead of a filename and extension, we get pdf as the filename with no extension and Windows doesn't recognize this as a pdf file.  If you do it a second time, you get a filename with pdf (2) as the name.

I know we could specify a filename in the markup, but with literally over a thousand pages, I would like to avoid that.  Another suggestion is that we could instead do the translation in the code behind rather than the aspx page - I haven't tried that, but that also entails updating over a thousand pages along with reverting the aspx change.  Does anyone else have a better way?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 08 Mar 2018, 02:39 PM
Hi Dan,

You can try using a DataAdapter to apply this property only in one single place. Here is a sample with a picker control:
https://www.telerik.com/forums/how-to-prevent-raddatepicker-auto-correct-date#50kgrh1loEu7X6AjKb186Q

I hope this will prove helpful.

Regards,
Eyup
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
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or