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

export webpages to PDF and retreiving data from DataSource without keeping the old data

3 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jurgen
Top achievements
Rank 1
Jurgen asked on 25 Nov 2013, 01:11 PM
During our development we are wondering how we best can export the webpages we created which contains Kendo elements to PDF format. We saw earlier on the forum that there was a post where was asked what the best way would be to export a grid to PDF, but we would like to do this with the entire page. these pages also contains CSS files which does not makes in any easier to export this to a file. 

We also noticed that Telerik has some functions for this(exporting data to PDF or Excel). Is Kendo going to include these features also?

One final thing currently we need to keep the DataSources in our memory after initializing it. is there a smarter solution for this or is there a smarter solution coming for this.

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Nov 2013, 02:25 PM
Hi Jurgen,

Kendo UI doesn't include any features to export a whole web page to PDF format. You can try a third party web site such as http://pdfcrowd.com/ (you can test PDF generation by pasting some Kendo UI live demo URL).

Adding export features to certain Kendo UI widgets (but not a whole page) is part of our long term plans. 

I do not understand your final question. What do you mean by a smarter solution for storing data sources in memory?

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jurgen
Top achievements
Rank 1
answered on 25 Nov 2013, 03:52 PM
Thank you for a fast answer.


what we meant with “a smarter solution for storing data sources in memory” is that Currently we need to use the ToDataSourceResult extension method. But this method requires a collection of the original data through this we need to do again a service call throughout our system to access the data that could be available
in the UI element.  This would make our system fairly slow. So we where wondering if there is a smarter way to get the data back. Else we would have to
make a choice between storing the data temperately in our memory or recalling the data though our system. also note that most of the initialization of the
Kendo elements is done with AJAX calls.
0
Atanas Korchev
Telerik team
answered on 25 Nov 2013, 04:14 PM
Hi Jurgen,

You can either implement caching in your application level or disable the server-side operations (paging, sorting etc) of the grid's data source. Then the grid will make a single request for all data and keep it in memory at the client-side.
.DataSource(dataSource => dataSource
               .Ajax()
               .Batch(true)
               .PageSize(20)               
               .ServerOperation(false)

On the other hand the ToDataSourceResult method uses LINQ expression trees in order to minimize the amount of data retrieved from the data base. For example it only retrieves a single page of data (determined by the PageSize option). Of course you need to give an IQueryable instance returned from a LINQ-enabled provider (Entity Framework, Linq 2 SQL).

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Jurgen
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jurgen
Top achievements
Rank 1
Share this question
or