StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Set BO position to "Nothing" to clear data...Expand / Collapse
Author
Message
Posted 08/19/2008 2:20:09 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 12/22/2008 9:55:43 AM
Posts: 43, Visits: 181
Hello,

I have a TreeView on the form with categories 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 all data-binded controls get refreshed.

Everything works great, but when the user clicks the top node (main Category), I want to clear all data-binded controls to indicate that no object is selected. How can I do that?

I would think that something like: bo.Navigate(BusinessNavigationDirection.Absolute, 0);
 or bo.Navigate(BusinessNavigationDirection.Absolute, -1) would work, but it has no effect on BO position.

Thank you

Post #18593
Posted 08/19/2008 2:25:08 PM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 4:05:52 PM
Posts: 760, Visits: 3,282
Leonard P. (08/19/2008)
Hello,

I have a TreeView on the form with categories 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 all data-binded controls get refreshed.

Everything works great, but when the user clicks the top node (main Category), I want to clear all data-binded controls to indicate that no object is selected. How can I do that?

I would think that something like: bo.Navigate(BusinessNavigationDirection.Absolute, 0);
 or bo.Navigate(BusinessNavigationDirection.Absolute, -1) would work, but it has no effect on BO position.

Thank you

Hi Leonard,

I am not sure how you can do it the way you want it, but if you use an SP PanelManager, you can have 2 panels, one for the Top nodes with any message that will indicate the user that it iis on a Top node and one for children with all field details, then in your TreeView you control which panel to display based on the user selecting a Top or Child node.

 
Post #18594
Posted 08/19/2008 2:57:15 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 12/22/2008 9:55:43 AM
Posts: 43, Visits: 181
Thanks Edhy!

That's a good idea.

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

Post #18595
Posted 08/19/2008 9:51:37 PM
StrataFrame Team Member

StrataFrame Team Member

Group: StrataFrame Users
Last Login: 12/23/2008 11:10:40 AM
Posts: 232, Visits: 511
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 .

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.
Post #18606
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:31pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.047. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.