 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; SQL data source</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/sql-data-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 00:35:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Why isn&#8217;t my data displaying in the next page of Gridview?</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/why-isnt-my-data-displaying-in-the-next-page-of-gridview/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/why-isnt-my-data-displaying-in-the-next-page-of-gridview/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 17:25:28 +0000</pubDate>
		<dc:creator>Ilfoprog</dc:creator>
				<category><![CDATA[ASPX]]></category>
		<category><![CDATA[GridView]]></category>
		<category><![CDATA[SQL data source]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2005]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I added a sqldatasource from my toolbox to my aspx page. I then configured the sqldatasource to connect to a table. I then added a gridview to the same aspx page and selected the sqldatasource as it&#8217;s data source. In addition to other column formatting etc., I set paging to true. I then opened the [...]]]></description>
				<content:encoded><![CDATA[<p>I added a sqldatasource from my toolbox to my aspx page.  I then configured the sqldatasource to connect to a table.  I then added a gridview to the same aspx page and selected the sqldatasource as it&#8217;s data source.  In addition to other column formatting etc., I set paging to true.  I then opened the page in my browser, clicked the button I have on the page to display the gridview&#8217;s data.  However, when I click page 2 the gridview dissapears.  </p>
<p>I then tried another approach, I added the table directly from the Server Explorer, configured the defaulted SQLDataSource connection, I set paging to true.  I then opened the page in my browser, clicked the button I have on the page to display the gridview&#8217;s data(see new code snippet).  However, when I click page 2 the gridview dissapears.</p>
<p>That is the problem I&#8217;m having.  The gridview keeps disappearing when I click a page number.  There’s definitely more data to see.  I&#8217;m sure there&#8217;s a solution.  I thought I just set the paging to true.  But obviously it&#8217;s not that simple.  (see code snippet below).  </p>
<p> Thanks for anyone&#8217;s suppout.</p>
<p>BUTTON CODE:<br />
Protected Sub btn_All_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_All.Click</p>
<p>        Dim objConn As Data.SqlClient.SqlConnection<br />
        Dim objComm As Data.SqlClient.SqlCommand</p>
<p>        objConn = New SqlClient.SqlConnection<br />
        objConn.ConnectionString = &#8220;Data Source=CODA2K;Persist Security Info=True;password=codaprod; USER ID=codaprod;Initial Catalog=CODAPROD;&#8221;</p>
<p>        objConn.Open()<br />
        objComm = New SqlCommand(&#8220;pr_HolidaySales&#8221;, objConn)<br />
        objComm.CommandType = CommandType.StoredProcedure<br />
objComm.CommandTimeout = 500</p>
<p>        objComm.ExecuteNonQuery()</p>
<p>        GVHoliday.DataBind()</p>
<p>        GVHoliday.Visible = True</p>
<p>    End Sub</p>
<p>Open in New Window Select All</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/why-isnt-my-data-displaying-in-the-next-page-of-gridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/14 queries in 0.024 seconds using memcached
Object Caching 325/342 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 03:11:53 -->