Q:

JS, How to select all rows data of serverside DataTable

I have 2 pages of serverside Datatable and I want to select all rows data from all pages 

And this code 
var table = $('#table').DataTable({
    "processing": true,
    "serverSide": true,
    /*
        Some code
    */
})

var data = table.rows().data()
console.log(data)

returns the data of selected page only ( in this case the data of 1st page )
So, is it possible to select all data from all pages for serverside DataTables ?

A:

No, you can't. If you use remote paging, the client doesn't know anything about other pages records yet. 
According to documentation to select all records for local paging. You could use
table.rows().select()

In same way, if you want to deselect them just try like this.
table.rows().deselect();

