﻿<?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?)  » PanelManagerPage Deactivation event?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 18 Sep 2026 05:01:55 GMT</lastBuildDate><ttl>20</ttl><item><title>PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27255.aspx</link><description>Hi all,&lt;br&gt;
&lt;br&gt;
I am working on a form with an interface look similar to the SF Localization &amp; Messaging Editor, with a TreeView on the left and a Panel Manager on the right side.&lt;br&gt;
&lt;br&gt;
Problem I have is how would I know when a page is being deactivated?  &lt;br&gt;
[quote]Ex: User is modifying a record in Page A, then user clicks on another node which will activate Page B, but there is dirty data in the BO for Page A. [/quote]&lt;br&gt;
&lt;br&gt;
Where do I put code to validate above scenario and avoid Page B from being activated until the conflict have been resolved in Page A?&lt;br&gt;
&lt;br&gt;
The same thing is done in the Localization &amp; Messaging Editor, if I am modifying a message then click on another node while the BO is dirty a broken rule is created and I cannot leave that page until I save or cancel the record.  In which event should I put the code to validate this condition?&lt;br&gt;
&lt;br&gt;
Thanks!</description><pubDate>Mon, 31 May 2010 11:58:43 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27272.aspx</link><description>[quote][b]Ivan George Borges (05/31/2010)[/b][hr]Every treeview I have worked with I populated with specific BOs, so I too added the PKs to the node.Tag and usually a BO.field_name to the Node.Text. After that, I only took care of the NodeStateChanged and did whatever was necessary when the node.StateImageIndex was Checked or Unchecked.[/quote]&lt;br&gt;
Thanks Ivan,&lt;br&gt;
&lt;br&gt;
Yeap, in my case, there will be more data manipulation like adding/deleting/updating records which involve the same manipulation for the treeview nodes in order to keep it in sync with the current view, it will be fun, at least so far it looks much easier than when I did it with VFP :w00t:.</description><pubDate>Mon, 31 May 2010 11:58:43 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27270.aspx</link><description>Hi Edhy.&lt;/P&gt;&lt;P&gt;I have worked with some treeviews so far, but never attempted to create a generic one like you are doing. It sounds good to me, but this doesn't realy mean&amp;nbsp;a lot (:hehe:). &lt;/P&gt;&lt;P&gt;Every treeview I have worked with I populated with specific BOs, so I too added the PKs to the node.Tag and usually a BO.field_name to the Node.Text. After that, I only took care of the NodeStateChanged and did whatever was necessary when the node.StateImageIndex was Checked or Unchecked.</description><pubDate>Mon, 31 May 2010 07:46:14 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27267.aspx</link><description>Hi Ivan,&lt;br&gt;
&lt;br&gt;
Moving this post more on the TreeView control I have another question but first let me give a bit description of what I am after...&lt;br&gt;
&lt;br&gt;
I had created a form based on the SF Standard class with a listview (one 2 many) and the childform have another listview which of course calls another child form.  This design is not user friendly at all, but considering this was my first SF/.Net application a while a go, it passed :P&lt;br&gt;
&lt;br&gt;
Now I want to make this form more user friendly and a TreeView looks like the way to go.  So I am planning on playing with the form.PrimaryBusiness object to have generics calls based on the selected node, in this case I will only have 2 node levels, I am using the Node.Tag to save the record PK like the listview does, so assigning the current BO to the form.PrimaryBusinessObject allows me build generic methods and validations using the PrimaryBusinessObject.&lt;br&gt;
&lt;br&gt;
Ok, I know, you may be thinking... Edhy where is the question?:D  well here it is: this is my first time in .Net working with TreeView, am I in the right direction with this control and SF? &lt;br&gt;
&lt;br&gt;
Any suggestion, idea, greatly appreciated! :hehe:</description><pubDate>Sun, 30 May 2010 23:15:33 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27260.aspx</link><description>Glad it helped, Edhy. ;)</description><pubDate>Fri, 28 May 2010 16:14:44 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27258.aspx</link><description>Hi Ivan,&lt;br&gt;
&lt;br&gt;
Thanks, that will work.  I was focused on the page events instead of looking for a solution at other angle.</description><pubDate>Fri, 28 May 2010 16:02:07 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: PanelManagerPage Deactivation event?</title><link>http://forum.strataframe.net/FindPost27257.aspx</link><description>Hey Edhy.&lt;/P&gt;&lt;P&gt;Maybe you could put code into your Treeview BeforeSelect event and then test for BO state or whatever is the condition for you to leave and if not accomplished, set "e.Cancel = True".</description><pubDate>Fri, 28 May 2010 15:42:15 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>