Forum

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

Search Forums:


 






Navigator option exceltext and pdftext

UserPost

04:14
02/05/2012


chridevo

Member

posts 8

Hi, I would like to add text to the export to excel and export to PDF buttons that are enabled in jqgrid like this:

$grid->setNavOptions('navigator', array("excel"=>true,"add"=>false,"edit"=>false,"del"=>false,"view"=>false, "search"=>true, "searchtext"=>"Search","pdf"=>true, "cloneToTop"=>true, "refreshtext"=>"Refresh"));

Since the option is not documented (I have just logged a feature request in that forum) perhaps I can achieve what I want using a custom button with a caption? Can anyone help me with the onClickButton script please? I have tried:

$buttonoptions = array("#pager", array("caption"=>"Custom Button", "onClickButton"=>"js: function(){jQuery('#grid').jqGrid('excelExport')}"));

and many variations but my js skills are terrible.

Thanks.

02:03
08/05/2012


chridevo

Member

posts 8

Post edited 02:05 – 08/05/2012 by chridevo
Post edited 02:08 – 08/05/2012 by chridevo


I asked support for help on this issue and they pointed me to the php method setButtonOptions:

The solution is simple and looks like this:

$grid->setButtonOptions("excel",array("caption"=>"Export to Excel","title"=>"Export Excel"));

$grid->setButtonOptions("pdf",array("caption"=>"Print to PDF","title"=>"Print PDF")); 




About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

71 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9661

Posts: 28949

Membership:

There are 10357 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1167

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

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




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information