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.
- <script type]="text/javascript">
- function PrintPanel() {
- var panel = document.getElementById("<%=Panel1.ClientID %>");
- var printWindow = window.open('', '', 'height=750,width=1100');
- printWindow.document.write('<html><head><title>Opportunities</title>');
- printWindow.document.write('</head><body >');
- printWindow.document.write(panel.innerHTML);
- printWindow.document.write('</body></html>');
- printWindow.document.close();
- setTimeout(function () {
- printWindow.print();
- }, 500);
- return false;
- }
- </script>
Kindly help me to add those field to my print page.