Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






How to print a jqGrid

UserPost

12:31
01/07/2010


kribot

Member

posts 11

Hello,


I need to print a jqGrid result, I'm trying to use jqPrint but the result is kind of messy, I don't have my array correctly rendered nor the column size etc… Do you have any idea how I can do that ? Or if there's any other plugin to do that ?


Best regards,

Kevin

14:19
01/07/2010


OlegK

Germany

Member

posts 1210

Hi!

There are no perfect way to print a jqGrid. Some information which can help you you can find in http://stackoverflow.com/quest…..69#2962569.

Best regards
Oleg 

17:39
01/07/2010


kribot

Member

posts 11

Thanks ! It's ok now :-)

15:18
07/07/2010


kribot

Member

posts 11

Hello,


It's strange it seems I got a regression, it now prints only the viewable rows, not the entire table, any idea ?


Best regards,

Kevin

15:54
07/07/2010


OlegK

Germany

Member

posts 1210

You should post a code example which reproduce the problem. Moreover I don't really understand your last remark. jqPrint how I know help only to print a part of page and make no changes in the code. So you are really print only what you see. If you use paging in the jqGrid and want to print all rows you have to display all rows before printing.

16:20
07/07/2010


kribot

Member

posts 11

Hello,


Thanks for your answer, what I want to do is print all my grid, but indeed I only view something like 20 records (and I don't want to show more records). What I can do to get this result ?


I'm quite new to jquery and other stuff, I see somewhere that I can print to an iframe ? didn't get exactly the way to do that.


Kevin

16:33
07/07/2010


OlegK

Germany

Member

posts 1210

If you create a jqGrid you define parameters rowNum and rowList. Default value of rowNum is 20 (see http://www.trirand.com/jqgridw…..ki:options). Typically you use a small value for rowNum and give user possibility (see pager at the bottom of the grid) to choose other number of rows to display for example rowList: [10, 20, 50, 1000]. After the user choose a large enough number of rows to display all the rows can be printed.

Another my answer http://stackoverflow.com/quest…..84#3057484 could be also interesting for you.

Regards
Oleg 


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

24 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10274

Posts: 30361

Membership:

There are 11038 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7383 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information