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

Export Grid To PDF

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sarahjoyce
Top achievements
Rank 1
Sarahjoyce asked on 28 May 2014, 02:46 PM
Hello,

I use Kendo ui and i'm discover  "Export Grid to pdf"

But I have just one problem. 
 It’s working but when I have a lot of data in grid who display 10 item per page, the export take just 10 first but no the rest. Do you have an advice for that?

Thanks you

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Jun 2014, 06:08 AM
Hello,

The export to pdf code library does this on purpose. You can avoid this by not calling the ToDataSourceResult method:

OLD:

 public FileResult Export([DataSourceRequest]DataSourceRequest request)
{
            IEnumerable products = db.Products.ToDataSourceResult(request).Data;
 
NEW:

 public FileResult Export([DataSourceRequest]DataSourceRequest request)
 {
            IEnumerable products = db.Products.ToList();
 


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
Grid
Asked by
Sarahjoyce
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or