﻿<?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?)  » Set BO position to "Nothing" to clear data binded controls</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:28:16 GMT</lastBuildDate><ttl>20</ttl><item><title>Set BO position to "Nothing" to clear data binded controls</title><link>http://forum.strataframe.net/FindPost18593.aspx</link><description>Hello, &lt;P&gt;I have a TreeView on the form with categories&amp;nbsp;as the most top nodes with children subnode. Each child node has a BO PK stored in the Tag property. When user clicks on a child node, I am changing the position of BO by calling .NavigateToPrimaryKey(pkId), and&amp;nbsp;all data-binded controls get refreshed.&lt;/P&gt;&lt;P&gt;Everything works great, but when the user clicks the top node (main Category), I want to clear all data-binded&amp;nbsp;controls to indicate that no object is selected. How can I do that?&lt;/P&gt;&lt;P&gt;I would think that something like: bo.Navigate(BusinessNavigationDirection.Absolute, 0); &lt;BR&gt;&amp;nbsp;or bo.Navigate(BusinessNavigationDirection.Absolute, -1) would work, but it has no effect on BO position.&lt;/P&gt;&lt;P&gt;Thank you&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;</description><pubDate>Tue, 19 Aug 2008 21:51:37 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item><item><title>RE: Set BO position to "Nothing" to clear data binded controls</title><link>http://forum.strataframe.net/FindPost18606.aspx</link><description>Edhy's solution is the cleanest, and is generally what we do. There isn't really a way to set a business object to a "nothing" state. Due to the way the currentrowindex works, it turn things a bit wonky if you couldn't rely on that to point to actual data within the BO :). &lt;br&gt;
&lt;br&gt;
Take a look at the business object mapper's functionality. When you click on a parent node, it shows you a message with some action items. When you click on a child node, it shows you any built fields. This is what Edhy was talking about with the panel manager approach, and is the kind of thing we do in the same situation.</description><pubDate>Tue, 19 Aug 2008 21:51:37 GMT</pubDate><dc:creator>Dustin Taylor</dc:creator></item><item><title>RE: Set BO position to "Nothing" to clear data binded controls</title><link>http://forum.strataframe.net/FindPost18595.aspx</link><description>Thanks Edhy! &lt;P&gt;That's a good idea. &lt;/P&gt;&lt;P&gt;Also What I tried, and so far it looks pretty good, is to select the first BO in that category when user clicks on the parent category node. Of course what users might think of this "feature" is another story :)</description><pubDate>Tue, 19 Aug 2008 14:57:15 GMT</pubDate><dc:creator>Leonard P.</dc:creator></item><item><title>RE: Set BO position to "Nothing" to clear data binded controls</title><link>http://forum.strataframe.net/FindPost18594.aspx</link><description>[quote][b]Leonard P. (08/19/2008)[/b][hr]Hello, &lt;P&gt;I have a TreeView on the form with categories&amp;nbsp;as the most top nodes with children subnode. Each child node has a BO PK stored in the Tag property. When user clicks on a child node, I am changing the position of BO by calling .NavigateToPrimaryKey(pkId), and&amp;nbsp;all data-binded controls get refreshed.&lt;/P&gt;&lt;P&gt;Everything works great, but when the user clicks the top node (main Category), I want to clear all data-binded&amp;nbsp;controls to indicate that no object is selected. How can I do that?&lt;/P&gt;&lt;P&gt;I would think that something like: bo.Navigate(BusinessNavigationDirection.Absolute, 0); &lt;BR&gt;&amp;nbsp;or bo.Navigate(BusinessNavigationDirection.Absolute, -1) would work, but it has no effect on BO position.&lt;/P&gt;&lt;P&gt;Thank you&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;[/quote]&lt;/P&gt;&lt;P&gt;Hi Leonard,&lt;/P&gt;&lt;P&gt;I am not sure how you can do it the way you want it, but if you use an&amp;nbsp;SP&amp;nbsp;PanelManager, you can have 2 panels, one for the Top nodes with any message that will indicate the user that it iis on a&amp;nbsp;Top node&amp;nbsp;and one for children with all field details, then in your TreeView you control which panel to display based on&amp;nbsp;the user selecting a Top or Child node.</description><pubDate>Tue, 19 Aug 2008 14:25:08 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>