Loading...

RE: How to hide a column during printing a page using qListView webpart ?

RE: How to hide a column during printing a page using qListView webpart ?

#7213
Anonymous
Anonymous
Participant

Hi Mandeep,

n

 

n

qListView uses a script function to print the page, so you need to modify this function to hide the button. Firstly, you need to navigate to the script file, the default path is: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\wpresources\WA.DataViewer. but if you deployed the QuickApps to the farm, you need to modify this file in all the servers. Open this file, locate to this fuction: GeneratePrintContent(webPartID, cssFiles, titleOfPrint), add below code into this function:

n

 

n

htmlContent += '<script src="/_layouts/15/QuestSoftware/JQuery/jquery-1.8.2.min.js"></script>';

n

htmlContent += '<script>$(document).ready(function(){var eidtButtons = $("img[src$=\'edititem.gif\']"); $.each(eidtButtons, function(index, btn){$(btn).css("display","none");})})</script>';

n

 

n

I assume you are using SP2013, so the jQuery path is under the ‘15’, if you are using SP2010, please remove the ‘15’ section. These code is using the CSS to hide all the buttons in the page.

n

 

n