How to Copy/Export ONLY current page (client side)

How to Copy/Export ONLY current page (client side)

KyleWarfordKyleWarford Posts: 2Questions: 1Answers: 0
edited January 2017 in Free community support

This has been really frustrating and I assume I am missing something obvious.

I am using HTML5 buttons primarily, though I am not specifying. I would like to just use the basic "buttons" code.

I have spent the last 2 hours looking for an answer to what seems like a very simple request. When you use pagination, with client side processing, copying/exporting etc gives you the entire dataset and not just the currently visible page. how do I change this so I am not given the entire dataset at once?

thank you.

Answers

  • kthorngrenkthorngren Posts: 20,424Questions: 26Answers: 4,794

    You can try this code to copy/export the visible rows and columns.

        buttons: [
                  {extend: 'copy',
                   exportOptions: {
                   columns: ':visible',
                     rows: ':visible'
                  }
                 },
                  {extend: 'print',
                   exportOptions: {
                   columns: ':visible',
                     rows: ':visible'
                  }
                 },
                  {extend: 'csv',
                   exportOptions: {
                   columns: ':visible',
                     rows: ':visible'
                  }
                 },
    
                ]
    

    Kevin

  • KyleWarfordKyleWarford Posts: 2Questions: 1Answers: 0

    thank you so much!

This discussion has been closed.