Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Sir - I want to print grid view data with horizontal, vertical lines table format.

I tried to print but I am getting without lines (plain format)

I put my Grid View in div and wrote this code :-


JavaScript
<script type="text/javascript">
        function CallPrint() {
            var printContent = document.getElementById('%=DivReport.ClientID %');
            printContent.border = 1;
            var WinPrint = window.open('PrintGridViewData','left=100,top=100,width=1000,height=1000,tollbar=10,scrollbars=1,status=1,paresizable=1');
WinPrint.document.write(document.getElementById('%=DivReport.ClientID %').innerHTML);
            WinPrint.document.close();
            WinPrint.focus();
            WinPrint.print();
            WinPrint.close();
        }
 </script>


Please help me...
Posted
Updated 11-Nov-14 17:19pm
v4
Comments
Garth J Lancaster 10-Nov-14 4:48am    
in future, please, NO ALL CAPS, and please don't use text speak 'pls' for example

1 solution

 
Share this answer
 
v3
Comments
Member 10776340 10-Nov-14 4:54am    
THANKQ FOR GIVEN RESPONSE ..BUT I CAN'T GET ANY CODE ...PLS SEND THE CODE

DEEPUSNAIR SIR...
Thanks7872 10-Nov-14 5:18am    
Did you look at the comment to your question? No caps?

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