kaurr 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.