<?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: Always show the PagerTemplate in GridView control</title>
	<atom:link href="http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/</link>
	<description>Pursuing Web Application Zen</description>
	<lastBuildDate>Sun, 05 Jul 2009 18:30:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Binu AG</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-5873</link>
		<dc:creator>Binu AG</dc:creator>
		<pubDate>Wed, 29 Apr 2009 13:58:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-5873</guid>
		<description>Hello Polisetty, Its very nice and simple property... no need of coding.. just  define the property.... gr8....</description>
		<content:encoded><![CDATA[<p>Hello Polisetty, Its very nice and simple property&#8230; no need of coding.. just  define the property&#8230;. gr8&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suvasish</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-5316</link>
		<dc:creator>Suvasish</dc:creator>
		<pubDate>Tue, 17 Mar 2009 11:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-5316</guid>
		<description>Dear Sir,
I am new to .Net .
Thanks for the great article,but i could not understand it.
If u clarify it ,it will be good.
My requirement is ,i want to to show my pager template alway for 1 page also.
i am using custom paging using object data source.

Waiting for ur reply

Thanks
Suvasish</description>
		<content:encoded><![CDATA[<p>Dear Sir,<br />
I am new to .Net .<br />
Thanks for the great article,but i could not understand it.<br />
If u clarify it ,it will be good.<br />
My requirement is ,i want to to show my pager template alway for 1 page also.<br />
i am using custom paging using object data source.</p>
<p>Waiting for ur reply</p>
<p>Thanks<br />
Suvasish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Bray</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-5194</link>
		<dc:creator>Greg Bray</dc:creator>
		<pubDate>Mon, 09 Mar 2009 23:57:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-5194</guid>
		<description>I found an easier way... all you have to do is add some code to the DataBound event of the gridview:

protected void gvMyData_DataBound(object sender, EventArgs e)
{
        if (gvMyData.BottomPagerRow != null) //Make sure it exists.
        {
            gvMyData.BottomPagerRow.Visible = true;
        }
}</description>
		<content:encoded><![CDATA[<p>I found an easier way&#8230; all you have to do is add some code to the DataBound event of the gridview:</p>
<p>protected void gvMyData_DataBound(object sender, EventArgs e)<br />
{<br />
        if (gvMyData.BottomPagerRow != null) //Make sure it exists.<br />
        {<br />
            gvMyData.BottomPagerRow.Visible = true;<br />
        }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fábio Caldas</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-4343</link>
		<dc:creator>Fábio Caldas</dc:creator>
		<pubDate>Mon, 15 Dec 2008 11:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-4343</guid>
		<description>Hey people thanks for this code .. it´s saved me but I still have one problem.

Even setting the Pager to show I can´t get a control inside PagerTemplate.

for example I tryied:

&lt;code&gt; 
protected void gdvPromocoes_DataBound(object sender, EventArgs e)
{
   if (gdvPromocoes.Rows.Count &gt; 0)
   {
      Control control = gdvPromocoes.HeaderRow.FindControl(&quot;lbRowCount&quot;);
   }
}
&lt;/code&gt;

but I always get null.

Anyone knows why? And how to solve this?

Thanks</description>
		<content:encoded><![CDATA[<p>Hey people thanks for this code .. it´s saved me but I still have one problem.</p>
<p>Even setting the Pager to show I can´t get a control inside PagerTemplate.</p>
<p>for example I tryied:</p>
<p><code><br />
protected void gdvPromocoes_DataBound(object sender, EventArgs e)<br />
{<br />
   if (gdvPromocoes.Rows.Count &gt; 0)<br />
   {<br />
      Control control = gdvPromocoes.HeaderRow.FindControl("lbRowCount");<br />
   }<br />
}<br />
</code></p>
<p>but I always get null.</p>
<p>Anyone knows why? And how to solve this?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Ortiz</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-3832</link>
		<dc:creator>Joel Ortiz</dc:creator>
		<pubDate>Tue, 28 Oct 2008 00:36:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-3832</guid>
		<description>I used Peter Duerden&#039;s visible property code, instead in the GridView PreRender event and it works fine. This way you don&#039;t have to be worried about any return value.</description>
		<content:encoded><![CDATA[<p>I used Peter Duerden&#8217;s visible property code, instead in the GridView PreRender event and it works fine. This way you don&#8217;t have to be worried about any return value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiji Joseph</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-1072</link>
		<dc:creator>Shiji Joseph</dc:creator>
		<pubDate>Fri, 23 May 2008 11:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-1072</guid>
		<description>I tried what Umair Hafeez mentioned, and its working perfectly. I believe that is the best way to go about... less code less confusion and easier to understand.

Cheers!</description>
		<content:encoded><![CDATA[<p>I tried what Umair Hafeez mentioned, and its working perfectly. I believe that is the best way to go about&#8230; less code less confusion and easier to understand.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Duerden</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-1059</link>
		<dc:creator>Peter Duerden</dc:creator>
		<pubDate>Wed, 12 Mar 2008 12:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-1059</guid>
		<description>Just what I needed but required in C#. I have therefore made te following conversion and also included a check for the bottom pager row:

&lt;code&gt;protected override int CreateChildControls(IEnumerable dataSource, bool dataBinding)
        {
            int returnValue = base.CreateChildControls(dataSource, dataBinding);

            if (this.TopPagerRow != null &amp;&amp; this.AlwaysShowPager)
            {
                this.TopPagerRow.Visible = true;
            }

            if (this.BottomPagerRow != null &amp;&amp; this.AlwaysShowPager)
            {
                this.BottomPagerRow.Visible = true;
            }

            return returnValue;
        }&lt;/code&gt;

Thanks.</description>
		<content:encoded><![CDATA[<p>Just what I needed but required in C#. I have therefore made te following conversion and also included a check for the bottom pager row:</p>
<p><code>protected override int CreateChildControls(IEnumerable dataSource, bool dataBinding)<br />
        {<br />
            int returnValue = base.CreateChildControls(dataSource, dataBinding);</p>
<p>            if (this.TopPagerRow != null &amp;&amp; this.AlwaysShowPager)<br />
            {<br />
                this.TopPagerRow.Visible = true;<br />
            }</p>
<p>            if (this.BottomPagerRow != null &amp;&amp; this.AlwaysShowPager)<br />
            {<br />
                this.BottomPagerRow.Visible = true;<br />
            }</p>
<p>            return returnValue;<br />
        }</code></p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Umair Hafeez</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-1032</link>
		<dc:creator>Umair Hafeez</dc:creator>
		<pubDate>Sat, 05 Jan 2008 05:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-1032</guid>
		<description>I have done a little thing.

After calling the GridView.DataBind()

just write the following line.

GridView.TopPagerRow.Visible = True
OR
GridView.BottomPagerRow.Visible = True

This does the trick for me.</description>
		<content:encoded><![CDATA[<p>I have done a little thing.</p>
<p>After calling the GridView.DataBind()</p>
<p>just write the following line.</p>
<p>GridView.TopPagerRow.Visible = True<br />
OR<br />
GridView.BottomPagerRow.Visible = True</p>
<p>This does the trick for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrew</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-656</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Thu, 09 Aug 2007 14:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-656</guid>
		<description>No problem, just so you know, i was looking around for a while trying to figure this out but after i saw your solution it tracked me down to the exact point in the reflected gridview code that i needed to understand.  I just twisted your solution slightly.  Thanks for doing the leg work!!!</description>
		<content:encoded><![CDATA[<p>No problem, just so you know, i was looking around for a while trying to figure this out but after i saw your solution it tracked me down to the exact point in the reflected gridview code that i needed to understand.  I just twisted your solution slightly.  Thanks for doing the leg work!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan McDonnell</title>
		<link>http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/comment-page-1/#comment-611</link>
		<dc:creator>Ryan McDonnell</dc:creator>
		<pubDate>Thu, 09 Aug 2007 06:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanmcdonnell.com/always-show-the-pagertemplate-in-gridview-control/#comment-611</guid>
		<description>Amazing how we can overlook the simplest of solutions at times. :-)

Thanks for the VB code, Andrew.</description>
		<content:encoded><![CDATA[<p>Amazing how we can overlook the simplest of solutions at times. <img src='http://www.ryanmcdonnell.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Thanks for the VB code, Andrew.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
