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

Print all pages in a Grid

1 Answer 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 2
Ian asked on 15 Aug 2013, 08:36 PM
I have a grid with pages which I need to be able to print all at once in one line list of data.

Is there a way to tell the Grid to either re-render with no paging, print, then go back to paging, or to print all data without the paging auto magically?

The user wants the full data printed at once, but likes Paging when using the data on the screen.

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 16 Aug 2013, 09:02 AM
Hello Ian,

It is possible to change the page size of the Grid via pageSize method of the DataSource. This will let you to dynamically change the amount of records displayed by the widget.

If you set the pageSize to be equal to the total amount of records, the Grid will display all items on a single page. For example:
var dataSource = $("#grid").data("kendoGrid").dataSource;
dataSource.pageSize(dataSource.total());

To "go back to paging" simply change the page size again.
I hope this approach will fit in your scenario.
 

Regards,
Alexander Valchev
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
Ian
Top achievements
Rank 2
Answers by
Alexander Valchev
Telerik team
Share this question
or