I am currently fetching the complete user details and lists it into a html table from the database table.I need to take the print of that particular list so i use the window.print()
to do it. I place the entire html table which needed to be printed inside a div
called <div id="printableArea">
and uses the following javascript to do the job.
function printDiv(printableArea)
{
var tabl = document.getElementById('tablePrint');
var row = tabl.rows[0];
var cell = row.cells[0];
cell.innerHTML = '';
var printContents = document.getElementById(printableArea).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
But the problem is that i am getting the pagination
button delete
button in the bottom of the page along with the check boxes for selection corresponding to each row.How can i avoid those? Also i need to take the print out page to be in a grid format.
Need suggestions. Thanks in advance.