shahnid k

shahnid k

  • NA
  • 61
  • 15.5k

Adding dropdown list text to print page.

Apr 2 2017 9:56 AM
 Hi,
Am trying to print the datas of my gridview using javascript. Its working fine and the datas present inside the gridview is printing properly. The problem is i have 3,4 dropdown list and the grid is filling as per the filter of dropdown list. so i need to display the text or values which are selected on dropdown list and show it on the header part of the printing page. Its a scrollable grid.Here is my javascript. On button click its calling the function. 
  1. <script type]="text/javascript">  
  2.     function PrintPanel() {  
  3.         var panel = document.getElementById("<%=Panel1.ClientID %>");  
  4.         var printWindow = window.open('''''height=750,width=1100');  
  5.         printWindow.document.write('<html><head><title>Opportunities</title>');  
  6.         printWindow.document.write('</head><body >');  
  7.         printWindow.document.write(panel.innerHTML);  
  8.         printWindow.document.write('</body></html>');  
  9.         printWindow.document.close();  
  10.         setTimeout(function () {  
  11.             printWindow.print();  
  12.         }, 500);  
  13.         return false;  
  14.     }  
  15. </script>  
 Kindly help me to add those field to my print page.