Click here to Skip to main content
15,890,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have used a javascript for printing gridview data...
XML
<script type="text/javascript">
        function printItn() {
            var prtGrid = document.getElementById('<%=grdreport.ClientID %>');

            prtGrid.border = 0;
            var prtwin = window.open('', 'PrintGridViewData', 'left=100,top=100,width=1000,height=1000,tollbar=0,scrollbars=1,status=0,resizable=1');
            prtwin.document.write(prtGrid.outerHTML);
            prtwin.document.close();
            prtwin.focus();
            prtwin.print();
            prtwin.close();
        }
    </script>


i have used paging in gridviews and evrytime it will be havin 5 to 6 pages. but this print button is printing only yhe first page which is visible... i want to print the whole gridview data.. pleas suggest me the changes in the above javascript or with any other code
Posted

1 solution

 
Share this answer
 
v2
Comments
rahul55555 23-Aug-13 8:04am    
i have replaced the code.. i dont have any errors. but when i am running it i am getting the msg as "google crome has crashed. relaunch it"
Thanks7872 23-Aug-13 8:05am    
Then it has something to do with google chrome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900