0
Answer

How to print scrollable grdview with Dropdown values in page

Ask a question
shahnid k

shahnid k

7y
220
1
Hi,
 
I have a scrollable gridview to be printed. There are 3,4 dropdown list also. I also need to get the values/Text of that dropdown to be displayed on the printing page. Datas inside the gridview is displayed according to the filter happening on that dropdown list. I have written some javascript code for printing option but it prints only the gridview values. I need to add the dropdown values too.
  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>Grdview_print</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>