<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Printing The Content of GridView</title>
	<atom:link href="http://sodeve.net/printing-the-content-of-gridview/feed/" rel="self" type="application/rss+xml" />
	<link>http://sodeve.net/printing-the-content-of-gridview/</link>
	<description>is a software developer&#60;br&#62;in a pursuit of happyness</description>
	<lastBuildDate>Fri, 16 Jul 2010 18:44:01 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ankit Singhal</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-5277</link>
		<dc:creator>Ankit Singhal</dc:creator>
		<pubDate>Sat, 05 Dec 2009 19:53:07 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-5277</guid>
		<description>This is great! Thanks a lot! it worked for me after making a little change when used with ASP.NET 3.5. What i did to the javascript is :

function Button1_onclick() {

            var grid_ID = &quot;ctl00_ContentPlaceHolder1_GridView1&quot;; //assuming that this is the generated ID
            var grid_obj = document.getElementById(grid_ID);
            if (grid_obj != null) {
            var new_window = window.open(&#039;print.html&#039;); //print.html is just a dummy page with no content in it.
                new_window.document.write(msg)
                new_window.document.write(grid_obj.outerHTML);
                //new_window.print();
                //new_window.close();
                }
        }</description>
		<content:encoded><![CDATA[<p>This is great! Thanks a lot! it worked for me after making a little change when used with ASP.NET 3.5. What i did to the javascript is :</p>
<p>function Button1_onclick() {</p>
<p>            var grid_ID = &#8220;ctl00_ContentPlaceHolder1_GridView1&#8243;; //assuming that this is the generated ID<br />
            var grid_obj = document.getElementById(grid_ID);<br />
            if (grid_obj != null) {<br />
            var new_window = window.open(&#8217;print.html&#8217;); //print.html is just a dummy page with no content in it.<br />
                new_window.document.write(msg)<br />
                new_window.document.write(grid_obj.outerHTML);<br />
                //new_window.print();<br />
                //new_window.close();<br />
                }<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shin</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-5068</link>
		<dc:creator>Shin</dc:creator>
		<pubDate>Mon, 28 Sep 2009 10:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-5068</guid>
		<description>hmmm just a problem though, i followed all the steps, but if i put this code  new_window.document.write(grid_obj.outerHTML); i am transferred to print.htm and i see the gridview i want to print but it seems the code new_window.print(); doesnt work.. but if i remove the code  new_window.document.write(grid_obj.outerHTML); once again im transferred to print.htm but ofcourse with a blank page.. but the print dialog box would pop up meaning  new_window.print(); worked..</description>
		<content:encoded><![CDATA[<p>hmmm just a problem though, i followed all the steps, but if i put this code  new_window.document.write(grid_obj.outerHTML); i am transferred to print.htm and i see the gridview i want to print but it seems the code new_window.print(); doesnt work.. but if i remove the code  new_window.document.write(grid_obj.outerHTML); once again im transferred to print.htm but ofcourse with a blank page.. but the print dialog box would pop up meaning  new_window.print(); worked..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shin</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-5066</link>
		<dc:creator>Shin</dc:creator>
		<pubDate>Mon, 28 Sep 2009 09:30:11 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-5066</guid>
		<description>ive been loooking all around almost everywhere and im getting desperate but still no answer until i came up with this thread.. thanks alot man! ur a life saver! this really works! once again thank you!</description>
		<content:encoded><![CDATA[<p>ive been loooking all around almost everywhere and im getting desperate but still no answer until i came up with this thread.. thanks alot man! ur a life saver! this really works! once again thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hardono Arifanto</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-4956</link>
		<dc:creator>Hardono Arifanto</dc:creator>
		<pubDate>Fri, 28 Aug 2009 20:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-4956</guid>
		<description>Hi Collin,

The code is supposed to copy the &#039;content&#039; of your Gridview, then pasted it in a new window. The new window is the one that will be printed.

I think somehow you copy the whole content of the original page, instead of only the &#039;outerHTML&#039; of the Gridview.</description>
		<content:encoded><![CDATA[<p>Hi Collin,</p>
<p>The code is supposed to copy the &#8216;content&#8217; of your Gridview, then pasted it in a new window. The new window is the one that will be printed.</p>
<p>I think somehow you copy the whole content of the original page, instead of only the &#8216;outerHTML&#8217; of the Gridview.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: colin</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-4950</link>
		<dc:creator>colin</dc:creator>
		<pubDate>Wed, 26 Aug 2009 09:39:32 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-4950</guid>
		<description>this prints my wole page instead of just the gridview</description>
		<content:encoded><![CDATA[<p>this prints my wole page instead of just the gridview</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hardono Arifanto</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-4561</link>
		<dc:creator>Hardono Arifanto</dc:creator>
		<pubDate>Wed, 01 Jul 2009 09:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-4561</guid>
		<description>Unfortunately it&#039;s beyond Javascript&#039;s control. You could try some browser specific ( Internet Explorer ) trick discussed at http://p2p.wrox.com/asp-forms/6474-printing-problem-asp.html</description>
		<content:encoded><![CDATA[<p>Unfortunately it&#8217;s beyond Javascript&#8217;s control. You could try some browser specific ( Internet Explorer ) trick discussed at <a href="http://p2p.wrox.com/asp-forms/6474-printing-problem-asp.html" rel="nofollow">http://p2p.wrox.com/asp-forms/6474-printing-problem-asp.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parag</title>
		<link>http://sodeve.net/printing-the-content-of-gridview/comment-page-1/#comment-1760</link>
		<dc:creator>Parag</dc:creator>
		<pubDate>Tue, 03 Mar 2009 05:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://sodeve.net/printing-the-content-of-gridview/#comment-1760</guid>
		<description>Hi,
Thanks for it.
But how can i specify the paper, font size and other needed formatting?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for it.<br />
But how can i specify the paper, font size and other needed formatting?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
