Forum


03:01

28/02/2010

Hello. First I love jqGrid, used it in many scenarios with success and can't live witout it.
I have a situation where the content I have to show can potentially have many thousands lines of text long. The truescrolling feature of jqGrid do a great job of managing that kind of content on the screen; I just turn each line of text in a row, build a page of them and feed jqGrid through jSON calls. Since the user really never loads all the pages, the script execution to render the jqgrid and the resulting data that gets loaded in the DOM doesn't make the browser bend on its knees.
The tricky part is that when the user prints the document, all the data have to be printed. It can easily go up to 500 printed pages of text, each line being a jqgrid row.
I have a style media print override to make the grid scroll overflow invisible and also already use jqprint to dump the content I need to print in a iframe and to print this iframe. Of course, the grid takes the correct height when printed because of the css override but the pages of data that weren't loaded by the user actually scrolling to them are blanks.
Do you have any advice on how I could trigger all the pages of the truescrolling grid to load when I need to print the content?
I could always render the actual html full content server-side without using jqgrid, load the result into an iframe and print it. But I'd favor a 100% client-side solution, loading the content through jqgrid paging, ideally without having to render a second grid with different parameters inside the printing iframe.
Any advice around how I could achieve this are very welcome.
12:30

Moderators
30/10/2007

Hello,
Thanks.
IMHO the appropriate approach is to do it server-side, it is more robust instead that there is another request with a lot of data.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
60 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