<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>maonet technotes &#187; Databinding</title>
	<atom:link href="http://maonet.wordpress.com/tag/databinding/feed/" rel="self" type="application/rss+xml" />
	<link>http://maonet.wordpress.com</link>
	<description>IOC(SM):MOC(RM):TDD(NU):SCC(TFS):ORM(L2S):JSL(Jq):CIS(CC)</description>
	<lastBuildDate>Thu, 31 Dec 2009 17:16:53 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='maonet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/27569a47b055d3d0ff1d52cf3b0ce0d7?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>maonet technotes &#187; Databinding</title>
		<link>http://maonet.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://maonet.wordpress.com/osd.xml" title="maonet technotes" />
		<item>
		<title>Strange ListBox databinding</title>
		<link>http://maonet.wordpress.com/2008/10/17/strange-listbox-databinding/</link>
		<comments>http://maonet.wordpress.com/2008/10/17/strange-listbox-databinding/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 19:00:33 +0000</pubDate>
		<dc:creator>Frank Mao</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Databinding]]></category>

		<guid isPermaLink="false">http://maonet.wordpress.com/?p=270</guid>
		<description><![CDATA[When databinding IList to  listbox, the setter won&#8217;t be triggered when calling IList.Add(). I had to use a local variable, then set it back to view property to trigger the setter.
The listbox won&#8217;t automaticlly refresh/update the changes in IList, the stupid way of working around is set datasource to null, then set it to new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maonet.wordpress.com&blog=431779&post=270&subd=maonet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When databinding IList to  listbox, the setter won&#8217;t be triggered when calling IList.Add(). I had to use a local variable, then set it back to view property to trigger the setter.</p>
<p>The listbox won&#8217;t automaticlly refresh/update the changes in IList, the stupid way of working around is set datasource to null, then set it to new value.</p>
<p>Looks like <a href="http://dotnetperls.com/Content/DataSource-Array.aspx">using CuccencyManager</a> looks more professional? Here is<a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q308484"> MS&#8217;s instruction for CurrencyManager</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maonet.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maonet.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maonet.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maonet.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maonet.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maonet.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maonet.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maonet.wordpress.com/270/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maonet.wordpress.com/270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maonet.wordpress.com/270/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maonet.wordpress.com&blog=431779&post=270&subd=maonet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://maonet.wordpress.com/2008/10/17/strange-listbox-databinding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d41c3a25ca01f1e979e2bc86b8c4ed38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">FMao</media:title>
		</media:content>
	</item>
		<item>
		<title>Watch out the data type when doing databind</title>
		<link>http://maonet.wordpress.com/2008/10/08/watch-out-the-data-type-when-doing-databind/</link>
		<comments>http://maonet.wordpress.com/2008/10/08/watch-out-the-data-type-when-doing-databind/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 18:05:30 +0000</pubDate>
		<dc:creator>Frank Mao</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Databinding]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://maonet.wordpress.com/?p=254</guid>
		<description><![CDATA[We spent almost 3 hours today on trying to figure a weird problem about databinding combo box. The error just doesn&#8217;t make sense at all. What we wanted to do is very general and simple,  showing text in display area, but save key value back to object&#8217;s property.
We kept getting the selected index back to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maonet.wordpress.com&blog=431779&post=254&subd=maonet&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We spent almost 3 hours today on trying to figure a weird problem about databinding combo box. The error just doesn&#8217;t make sense at all. What we wanted to do is very general and simple,  showing text in display area, but save key value back to object&#8217;s property.</p>
<p>We kept getting the selected index back to -1 when tabbing out from combo box control, debugged into combobox_selectIndexChanged method, tried to do a cast to int from comboBox.SelectedValue. The comipler didn&#8217;t allow us to do that, complained data should be less than infinity.</p>
<p>What? We then added a intermediate cast, first cast to int, then cast this int to short. The problem went away.</p>
<p>That why, short and int just don&#8217;t match automatically when databinding.</p>
<p>Another example of telling me that UI work is hard.</p>
<p><a href="http://maonet.files.wordpress.com/2008/10/databinding_combobox2.jpg"><img class="alignnone size-full wp-image-259" title="databinding_combobox2" src="http://maonet.files.wordpress.com/2008/10/databinding_combobox2.jpg?w=405&#038;h=210" alt="" width="405" height="210" /></a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maonet.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maonet.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maonet.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maonet.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maonet.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maonet.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maonet.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maonet.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maonet.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maonet.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maonet.wordpress.com&blog=431779&post=254&subd=maonet&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://maonet.wordpress.com/2008/10/08/watch-out-the-data-type-when-doing-databind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d41c3a25ca01f1e979e2bc86b8c4ed38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">FMao</media:title>
		</media:content>

		<media:content url="http://maonet.files.wordpress.com/2008/10/databinding_combobox2.jpg" medium="image">
			<media:title type="html">databinding_combobox2</media:title>
		</media:content>
	</item>
	</channel>
</rss>