<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataSource on Justin Carmony</title>
		<link>https://www.justincarmony.com/tags/datasource/</link>
		<description>Recent content in DataSource on Justin Carmony</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Thu, 31 Jan 2008 21:40:27 +0000</lastBuildDate>
		
			<atom:link href="https://www.justincarmony.com/tags/datasource/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>ASP .NET, GridViews, SqlDataSource, and Guid Parameters</title>
				<link>https://www.justincarmony.com/2008/01/31/asp-net-gridviews-sqldatasource-and-guid-parameters/</link>
				<pubDate>Thu, 31 Jan 2008 21:40:27 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/01/31/asp-net-gridviews-sqldatasource-and-guid-parameters/</guid>
				<description>&lt;p&gt;Another thing I ran into today. I actually ran into it awhile back but since I ran into it again today I&amp;rsquo;d thought I&amp;rsquo;d post on it to help anyone who happens to find it.&lt;/p&gt;&#xA;&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;You have a GridView and a SqlDataSource that takes 1 or more Guids as a Parameter. You use the built in DataSource configuration and it doesn&amp;rsquo;t give any errors. However, when you actually run it and pass the Guid, you get this error:&lt;/p&gt;</description>
			</item>
			<item>
				<title>ASP .NET GridView Access to Data In Code</title>
				<link>https://www.justincarmony.com/2008/01/22/asp-net-gridview-access-to-data-in-code/</link>
				<pubDate>Tue, 22 Jan 2008 16:52:38 +0000</pubDate>
				<guid>https://www.justincarmony.com/2008/01/22/asp-net-gridview-access-to-data-in-code/</guid>
				<description>&lt;p&gt;There are situations where you want to gain access to the GridView&amp;rsquo;s DataSet to display extra information outside of the GridView. I found the following code to work the best for me. You can get the information from the DataSource of a GridView by doing the following:&lt;/p&gt;&#xA;&lt;p&gt;DataView dv = (DataView)sdsDataSource.Select(DataSourceSelectArguments.Empty);&#xA;if (dv != null)&#xA;{&#xA;try&#xA;{&#xA;strName = (String)dv.Table.Rows[0][&amp;ldquo;Name&amp;rdquo;];&#xA;}&#xA;catch { strName = &amp;ldquo;N/A&amp;rdquo;; }&#xA;}&lt;/p&gt;&#xA;&lt;p&gt;You should be able to access whatever information you need from the DataView.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
