Forum



18:20

11/05/2010

Hello,
I'm still trying to implement a printing feature on my webpage and the jqGrid doesn't feet at all in the printing page. I don't know what to do, I just need to print what's on the screen, but even when I set the grid height to 100% (to view all the rows, it could be 1000 rows or more) when I print either with jqPrint or the browser (ie Mozilla) print function the grid.
That's when I print the div which is the parent of the grid.
If I print the grid itself, I had now all my rows printed but no formatting at all... I put all my css to media=all btw
Did anyone have an idea/clue to solve my problem ?
Best regards,
Kevin
21:05

31/07/2010

Did you try setting the media to "print" dynamically before printing?
When I printed, when the media for the jqGrid CSS include was set to "screen", the jqGrid did not print –
<link id = "jqgrid_stylesheet" rel="stylesheet" type="text/css" media="screen" href="../common/js/jquery/css/jquery-grid/ui.jqgrid.css" />
Then, I changed the media to "print" before printing (window.print()) and it printed fine –
document.getElementById("jqgrid_stylesheet").media = "print";
window.print();
After printing, I changed the media back to "screen" –
document.getElementById("jqgrid_stylesheet").media = "print";
Most Users Ever Online: 715
Currently Online:
53 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66