Print button only prints current page data.
Print button only prints current page data.
Hi Team,
I am using latest version of DataTable.
I am facing issue realted to print button. I am calling my data by Ajax url and when I print the record it prints only current list records. Just Like if I am searching something which gives me 15 record and pagination is selected as 10 Rows. SO on print it prints only 10 records.
So how can I make DataTable which prints all record and doesn't go for pagination?
I am using following code.
//---------------------------------------------
processing: true,
serverSide: true,
ajax: {
url: "AJAX URL",
type:"POST"
},
buttons: [
{
extend: 'print',
autoPrint: false,
}
],
//---------------------------------------------
I have tested my code by removing "serverSide: true ". Then It works according to my requirements.
But How can I do it without remove serverside processing.
Thank you in advance
Answers
See this FAQ:
https://datatables.net/faqs/#buttons
Hi @cis1354 ,
I just saw this thread, I appreciate it's old, but the reason why is because
serverSide
is enabled, this means the client only has access to what's being displayed.Cheers,
Colin