•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 423,010 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,932 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1765 | Replies: 0
![]() |
•
•
Join Date: Sep 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello Expertzzz.
I need ur help urgently.I am trying to print datagrid in DIV tag.I am using following javascript funtion to print Datagrid in asp.net
function CallPrint(strid1) { var WinPrint; var prtContent = document.getElementById(strid1); var strOldOne=prtContent.innerHTML; var WinPrint = window.open(); //var WinPrint = window.open('','','left=0,top=0,width=500px,height=500px,toolbar=0,scrollbars=no,status=0'); WinPrint.document.write(prtContent.innerHTML); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); WinPrint.close(); prtContent.innerHTML=strOldOne; }
And i am calling this function on button click.
<INPUT class="nakoPrint" id="Button1" style="BORDER-RIGHT: slateblue 1px solid; BORDER-TOP: slateblue 1px solid; BORDER-LEFT: slateblue 1px solid; BORDER-BOTTOM: slateblue 1px solid"
onclick="javascript:CallPrint('carspeldiv');" type="button" size="15px" value="Print" name="BtnPrint" runat="server">
But my problem is that it is not printing datagrid column.Datagrid contains 10 columns records while its printing only two columns records.This is coz page size is less that grid size.
Please help me asap....
Looking forward for ur positive reply....
Many Thanks
I need ur help urgently.I am trying to print datagrid in DIV tag.I am using following javascript funtion to print Datagrid in asp.net
function CallPrint(strid1) { var WinPrint; var prtContent = document.getElementById(strid1); var strOldOne=prtContent.innerHTML; var WinPrint = window.open(); //var WinPrint = window.open('','','left=0,top=0,width=500px,height=500px,toolbar=0,scrollbars=no,status=0'); WinPrint.document.write(prtContent.innerHTML); WinPrint.document.close(); WinPrint.focus(); WinPrint.print(); WinPrint.close(); prtContent.innerHTML=strOldOne; }
And i am calling this function on button click.
<INPUT class="nakoPrint" id="Button1" style="BORDER-RIGHT: slateblue 1px solid; BORDER-TOP: slateblue 1px solid; BORDER-LEFT: slateblue 1px solid; BORDER-BOTTOM: slateblue 1px solid"
onclick="javascript:CallPrint('carspeldiv');" type="button" size="15px" value="Print" name="BtnPrint" runat="server">
But my problem is that it is not printing datagrid column.Datagrid contains 10 columns records while its printing only two columns records.This is coz page size is less that grid size.
Please help me asap....
Looking forward for ur positive reply....
Many Thanks
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- How to fetch a datagrid content or data to a print page function? (VB.NET)
- print datagrid (ASP.NET)
- How to print the items in a datagrid in ASP .Net (ASP.NET)
- how to print datagrid only? (ASP.NET)
- print datagrid (JavaScript / DHTML / AJAX)
Other Threads in the ASP.NET Forum
- Previous Thread: ASP Active Directory
- Next Thread: Replacing "Enter" in textBox


Linear Mode