Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 5th, 2005, 12:32 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default URGENT HELP WITH PRINTING!!!!

Hi Friends

I need some help with printing. I am developing a web-based application, wherein there is a section called User Account, which shows the user's purchase details for the current month in a DataGrid.

Now I have to give a print option to the user so that he can print the details of the DataGrid. Please help me! (How to print only the contents of a datagrid, not the complete page)
Thanks
MIke


__________________
Regards
Mike
 
Old October 5th, 2005, 02:58 AM
Registered User
 
Join Date: Jul 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi mike_remember,
Here is sample code. U may have a try.

function CallPrint(strid)
{
  var prtContent = document.getElementById(strid);
  var WinPrint = window.open('','','letf=0,top=0,width=1000,height= 1000,toolbar=0,scrollbars=1,status=0');
  WinPrint.document.write prtContent.innerHTML);
  WinPrint.document.close();
  WinPrint.focus();
  WinPrint.print();
  WinPrint.close();
}

Html code is :
<input class="button2" id="btnPrint" onclick = "javascript:CallPrint('divPrint')" type="button" value="Printable Version" runat="server">






Similar Threads
Thread Thread Starter Forum Replies Last Post
printing in php...urgent raaj Beginning PHP 1 March 14th, 2007 12:57 AM
Printing cf2006 Pro Visual Basic 2005 4 July 20th, 2006 12:31 PM
Urgent help with printing and PDF creation mike_remember ASP.NET 1.0 and 1.1 Professional 0 October 22nd, 2005 08:25 AM
capturing printing settings when printing reports nikolaosk Access VBA 0 February 8th, 2005 04:14 AM
Printing problem in Visual Basic ! Urgent venkatesh_anmca Beginning VB 6 2 January 29th, 2005 02:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.