﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » TreeView Data Binding Guidance</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 09:38:04 GMT</lastBuildDate><ttl>20</ttl><item><title>TreeView Data Binding Guidance</title><link>http://forum.strataframe.net/FindPost3826.aspx</link><description>I have a BO something like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;StrategyID&lt;/LI&gt;&lt;LI&gt;ParentStrategyID&lt;/LI&gt;&lt;LI&gt;Name&lt;/LI&gt;&lt;LI&gt;Description&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Actually, I should say I &lt;EM&gt;will &lt;/EM&gt;have a BO something like this, but anyway...would love to do one of two things with this data:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Allow the user to select a particular node on the tree so I can grab the StrategyID from it.&lt;/LI&gt;&lt;LI&gt;Allow the user to edit the tree in place.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I understand that #2 is more difficult than #1, and in fact just having an easy way to accomplish #1 would be great. #2 is not strictly necessary for my application, but would just be a nice-to-have.&lt;/P&gt;&lt;P&gt;By the way, I usually create a root node that has itself as its parent so that all the first-level nodes can have a real parent to point to and that way I don't have to deal with null parents and all that. But I'm open to suggestions on any of this...&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Wed, 15 Nov 2006 09:09:58 GMT</pubDate><dc:creator>Chris Crabtree</dc:creator></item><item><title>RE: TreeView Data Binding Guidance</title><link>http://forum.strataframe.net/FindPost4481.aspx</link><description>By the way, I just wanted to share that I ended up using a TreeList from Developer Express which had explicit support for a self-referencing table to implement a parent/child relationship and in-place editing.&lt;/P&gt;&lt;P&gt;I just used the SF BusinessBindingSource and set the tree's KeyFieldName and ParentFieldName values appropriately. Added the RootValue for a dummy root parent row and was basically done.&lt;/P&gt;&lt;P&gt;Very nice.</description><pubDate>Wed, 15 Nov 2006 09:09:58 GMT</pubDate><dc:creator>Chris Crabtree</dc:creator></item><item><title>RE: TreeView Data Binding Guidance</title><link>http://forum.strataframe.net/FindPost3831.aspx</link><description>Generally, with treeviews, we build the tree manually by iterating through the business object(s) containing the data for the node.&amp;nbsp; We put the primary key or a&amp;nbsp;NodeInfo structure (that contains the pk and a node type flag) in the Tag of each node that we place in the tree. &amp;nbsp;Then, we handle the AfterSelect event of the treeview and depending upon the node type flag in the structure in the tag, we process more information, like show a panel on the right that contains detailed information about the node.&amp;nbsp; As for editing in place, you will need to set the LabelEdit property to True and handle the BeforeLabelEdit (optional) and the AfterLabelEdit event to seek to the record in the business object and change the value.</description><pubDate>Tue, 24 Oct 2006 08:21:43 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>