<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: WPF DataBinding and DBNulls</title>
	<atom:link href="http://rob.runtothehills.org/archives/160/feed" rel="self" type="application/rss+xml" />
	<link>http://rob.runtothehills.org/archives/160</link>
	<description>Talk is cheap. Show me the code.</description>
	<lastBuildDate>Tue, 24 Aug 2010 09:16:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Rob</title>
		<link>http://rob.runtothehills.org/archives/160/comment-page-1#comment-1528</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Mon, 25 Jan 2010 19:55:39 +0000</pubDate>
		<guid isPermaLink="false">http://runtothehills.org/rob/archives/160#comment-1528</guid>
		<description>Hi Matt.
I&#039;ts been almost 2 years since I wrote this post,(I dont know why the comments show Oct2009!) and i&#039;ve been on an ASP.Net contract for over 12 months so haven&#039;t paid much attention to the problem I first encountered. I would imagine in the newest versions of WPF/ADO there would be an infinitely more elegant way of handling this! Sorry I cant be much help at the moment!
Rob</description>
		<content:encoded><![CDATA[<p>Hi Matt.<br />
I&#8217;ts been almost 2 years since I wrote this post,(I dont know why the comments show Oct2009!) and i&#8217;ve been on an ASP.Net contract for over 12 months so haven&#8217;t paid much attention to the problem I first encountered. I would imagine in the newest versions of WPF/ADO there would be an infinitely more elegant way of handling this! Sorry I cant be much help at the moment!<br />
Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mattreek</title>
		<link>http://rob.runtothehills.org/archives/160/comment-page-1#comment-1527</link>
		<dc:creator>mattreek</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://runtothehills.org/rob/archives/160#comment-1527</guid>
		<description>As far as I know only DataRowView implements INotifyPropertyChanged.

In this case: How could you implement INotifyPropertyChanged to ensure the Binding also gets notified when properties of the wrapped dataRow are changed? Is this possible with this approach?

thanks
matt</description>
		<content:encoded><![CDATA[<p>As far as I know only DataRowView implements INotifyPropertyChanged.</p>
<p>In this case: How could you implement INotifyPropertyChanged to ensure the Binding also gets notified when properties of the wrapped dataRow are changed? Is this possible with this approach?</p>
<p>thanks<br />
matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rob</title>
		<link>http://rob.runtothehills.org/archives/160/comment-page-1#comment-1516</link>
		<dc:creator>rob</dc:creator>
		<pubDate>Tue, 06 Oct 2009 10:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://runtothehills.org/rob/archives/160#comment-1516</guid>
		<description>Hi,
That wasn&#039;t the issue - if you read the post I&#039;d written a value converter, but if you bind directly to a value type ADO will throw an exception when it *reads* the value for the value converter. the VC comes in too late. You have to avoid the exception before that happens, and you can only change the way ADO.net handles DBNULLs when you&#039;re dealing with a ref type.
so you&#039;re back to wrapping the offending type column with a custom business object to check for dbnulls.
thanks
Rob</description>
		<content:encoded><![CDATA[<p>Hi,<br />
That wasn&#8217;t the issue &#8211; if you read the post I&#8217;d written a value converter, but if you bind directly to a value type ADO will throw an exception when it *reads* the value for the value converter. the VC comes in too late. You have to avoid the exception before that happens, and you can only change the way ADO.net handles DBNULLs when you&#8217;re dealing with a ref type.<br />
so you&#8217;re back to wrapping the offending type column with a custom business object to check for dbnulls.<br />
thanks<br />
Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: littlesteps</title>
		<link>http://rob.runtothehills.org/archives/160/comment-page-1#comment-1515</link>
		<dc:creator>littlesteps</dc:creator>
		<pubDate>Tue, 06 Oct 2009 10:02:44 +0000</pubDate>
		<guid isPermaLink="false">http://runtothehills.org/rob/archives/160#comment-1515</guid>
		<description>Hello,

A better way is to use a ValueConverter. 
Its aim is to convert data correctly to data binding without any wrapper. Typically, you can have a ValueConverter upon your DataRow class to convert your null value to an &quot;Empty&quot; string, or you can decide to return an icon (ImageSource) corresponding to a DBNull, etc.

The philosophy of WPF and data binding invites the developer to have loosely coupled GUI.

Let&#039;s have a look to Bea Stollnitz&#039;s blog (aka Bea Costa): http://bea.stollnitz.com
She has a wonderful blog on databinding!

Regards,

LittleSteps</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>A better way is to use a ValueConverter.<br />
Its aim is to convert data correctly to data binding without any wrapper. Typically, you can have a ValueConverter upon your DataRow class to convert your null value to an &#8220;Empty&#8221; string, or you can decide to return an icon (ImageSource) corresponding to a DBNull, etc.</p>
<p>The philosophy of WPF and data binding invites the developer to have loosely coupled GUI.</p>
<p>Let&#8217;s have a look to Bea Stollnitz&#8217;s blog (aka Bea Costa): <a href="http://bea.stollnitz.com" rel="nofollow">http://bea.stollnitz.com</a><br />
She has a wonderful blog on databinding!</p>
<p>Regards,</p>
<p>LittleSteps</p>
]]></content:encoded>
	</item>
</channel>
</rss>
