Print all pages in a Grid

2 posts, 1 answers
  1. Ian
    Ian avatar
    73 posts
    Member since:
    Jun 2013

    Posted 15 Aug 2013 Link to this post

    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.
  2. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2891 posts

    Posted 16 Aug 2013 Link to this post

    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!
Back to Top