customize view for print button
customize view for print button
g.h.a.d.e.e.r
Posts: 2Questions: 1Answers: 0
Hi Guys,
i am viewing certain data in a table (datatable) on my web page, but what i need to print is same data but in different view, is it possible to customize the view i want to print through the print button?
Thanks in advance
This discussion has been closed.
Answers
you can set different types of focus for the excel, pdf buttons.. maybe for print too? i havent tried but this is my code for Excel export button, just add a exportOptions search applied and it focuses to export only the data filtered by search.
hope that helps.
{ extend: "excelHtml5", className: "btn btn-default btn-sm btn-primary", text: "<i class=\"icon glyphicon glyphicon-save-file\"></i> Excel", exportOptions: { search: 'applied' } }
thnaks for your reply.
it is quite an idea but it is not what i am seeking for, i am looking for changing the columns viewed not the rows themselves. anyways it won't matter any more because i found out that print button is not functional with server side.
if what you want is to select the columns to be printed you can check this answer
https://datatables.net/forums/discussion/31730/datatables-buttons-hide-columns-in-printing-and-exporting-to-excel