<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hierarchical Databinding in WPF</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx</link><description>I got an email the other day from a friend who was having some trouble getting the WPF TreeView to do what he wanted to do. He had a master-detail relationship between Doctors and Patients, and wanted to add some additional information about each Doctor</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Hierarchical Databinding in WPF</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx#8550848</link><pubDate>Sun, 25 May 2008 13:05:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8550848</guid><dc:creator>Josh Smith</dc:creator><description>&lt;p&gt;Nice post, Chris. &amp;nbsp;It would be much easier if you bound the TreeViewItems, and the elements in their ItemTemplate, to a ViewModel. &amp;nbsp;That would remove the need to walk the visual tree, etc.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx"&gt;http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Josh&lt;/p&gt;
</description></item><item><title>Link Listing - May 26, 2008</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx#8554797</link><pubDate>Tue, 27 May 2008 15:26:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8554797</guid><dc:creator>Christopher Steen</dc:creator><description>&lt;p&gt;ASP.NET Ending a Response without Response.End() Exceptions? [Via: Rick Strahl ] UFrame: div meets...&lt;/p&gt;
</description></item><item><title>re: Hierarchical Databinding in WPF</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx#8924145</link><pubDate>Thu, 04 Sep 2008 13:03:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8924145</guid><dc:creator>mehtavipulk</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a DB table [1] which is self referenced. DataID field is the FK of ParentDataID field. For multilevel hierarchical data binding to a WPF tree view control, I have a stored procedure that returns result set in the below mentioned order[1]. The below result set contains all the top level data with NULL ParentDataID data &amp;amp; all the child records has the ParentDataID field data as the pointer to its parent data. &lt;/p&gt;
&lt;p&gt;Based on the below dataset structure, we have a requirement to bind the resultset with the multi level hierarical data to the TreeView control. How can we achive this funcionality of binding the dynamic hierarical multi level dataset to TreeView?&lt;/p&gt;
&lt;p&gt;After binding the above result set, the Tree View data needs to be displayed in the below format. How do we implement this in the WPF Tree View?&lt;/p&gt;
&lt;p&gt;* Test 1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * Test 2&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* Test 5&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* Test 3&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* Test 6&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* Test 4&lt;/p&gt;
&lt;p&gt;[1]&lt;/p&gt;
&lt;p&gt;DataID ParentDataID &amp;nbsp;Description &lt;/p&gt;
&lt;p&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NULL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test 1 &lt;/p&gt;
&lt;p&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test 2 &lt;/p&gt;
&lt;p&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test 3 &lt;/p&gt;
&lt;p&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test 4 &lt;/p&gt;
&lt;p&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test 5 &lt;/p&gt;
&lt;p&gt;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Test 6 &lt;/p&gt;
&lt;p&gt; &amp;nbsp;Regards,&lt;/p&gt;
&lt;p&gt;Vipul Mehta&lt;/p&gt;
</description></item><item><title>re: Hierarchical Databinding in WPF</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx#8953557</link><pubDate>Tue, 16 Sep 2008 09:53:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8953557</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Hi Vipul&lt;/p&gt;
&lt;p&gt;i need the same stuff as you. If you find it, please send me a link. I will do the same to you.&lt;/p&gt;
&lt;p&gt;bye, Jon&lt;/p&gt;
</description></item><item><title>re: Hierarchical Databinding in WPF</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx#9177432</link><pubDate>Fri, 05 Dec 2008 02:40:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9177432</guid><dc:creator>Erik</dc:creator><description>&lt;p&gt;Nice example! Since you seem to know your way around TreeViews very well, I have a hopefully simple question for you. &lt;/p&gt;
&lt;p&gt;I have two DataTables, Group and Member, how could I create a tree like this:&lt;/p&gt;
&lt;p&gt;Group 1&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Group 1a&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Member A&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Member B&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Group 1b&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Member C&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Member D&lt;/p&gt;
&lt;p&gt;That is, a Group can have other (sub)Groups as well as Members as children.&lt;/p&gt;
</description></item><item><title>re: Hierarchical Databinding in WPF</title><link>http://blogs.msdn.com/chkoenig/archive/2008/05/24/hierarchical-databinding-in-wpf.aspx#9633623</link><pubDate>Thu, 21 May 2009 13:36:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9633623</guid><dc:creator>Igor</dc:creator><description>&lt;p&gt;hey, &lt;/p&gt;
&lt;p&gt;usefull stuff!&lt;/p&gt;
&lt;p&gt;but, do you really find your text styles readable?&lt;/p&gt;
&lt;p&gt;I have broken my eyes here!&lt;/p&gt;
&lt;p&gt;You intentionally place some useful things here to kill your visitors' eyes, isn't it?&lt;/p&gt;
</description></item></channel></rss>