I'm using a JS code that works great for printing:
function printdiv(divID) {
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.all.item(divID).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr + newstr + footstr;
window.print();
document.body.innerHTML = oldstr;
return false;
}
I just need to print some titles and there will be times when I have to print more than one grid . Then I created in the CSS the "print" and the "no print" and put everything inside the DIV divID
.
What happens, is that when grid is populated with many data appearing scroll bar or pagination it does not print everything.
With the grid all populated, only if I only put the grid inside this div
, it prints all the data.
I have tried in many ways and they all have this problem.