﻿<?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?)  » ChildForm BO Becomes Dirty Even though I havent changed anything</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 02:18:54 GMT</lastBuildDate><ttl>20</ttl><item><title>ChildForm BO Becomes Dirty Even though I havent changed anything</title><link>http://forum.strataframe.net/FindPost22131.aspx</link><description>Hi, &lt;/P&gt;&lt;P&gt;I've created a form with a ListView and associated a child form used the business object translations to map the parent BO to the child BO. So far I've only got the edit bit working but you can go in and change the details and it all works ok. &lt;/P&gt;&lt;P&gt;I have a couple of issues which I'm stuggling with a bit:&lt;/P&gt;&lt;P&gt;I've added an Ok and Cancel button onto the child form but when I click the cancel it still asks me to save the changes. Looking at this further it seems the child form bo is dirty before we make any changes on the form. What would be causing this? Am I going about this in the correct way? &lt;/P&gt;&lt;P&gt;Also when I go back to my Parent form one of the other BO's seems to have been cleared out? Any hints on what this could be? &lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Jon</description><pubDate>Mon, 02 Mar 2009 10:48:24 GMT</pubDate><dc:creator>Jon Neale</dc:creator></item><item><title>RE: ChildForm BO Becomes Dirty Even though I havent changed anything</title><link>http://forum.strataframe.net/FindPost22139.aspx</link><description>Jon, you may already know this, but just in case you don't and for those who may find this later...&lt;br&gt;
&lt;br&gt;
Any time you have an unknow cause for a BO getting dirty, there is a handy event, the IsDirtyChanged event. Simply handle this event, set a break point in it, run code and then use the call stack to see were it is getting set dirty.&lt;br&gt;
&lt;br&gt;
Glad you found your specific problem!</description><pubDate>Mon, 02 Mar 2009 10:48:24 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: ChildForm BO Becomes Dirty Even though I havent changed anything</title><link>http://forum.strataframe.net/FindPost22135.aspx</link><description>Hi Jon,&lt;/P&gt;&lt;P&gt;Glad you find the fix.&amp;nbsp; Now just to be clear, the StrataFlix approach of handling the data is not the same as the regular SF Maintenance Form would do, but it is a very good resource of seeing a different approach as one would call the standard/normal approach.</description><pubDate>Sun, 01 Mar 2009 10:53:50 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: ChildForm BO Becomes Dirty Even though I havent changed anything</title><link>http://forum.strataframe.net/FindPost22134.aspx</link><description>I've managed to figure out part of it. The BO was being set to dirt as I had &lt;FONT style="BACKGROUND-COLOR: #f6ff00"&gt;SetDirtyOnEdit&lt;/FONT&gt; = True on the BO. I'm not using a Maintenance Toolstrip so I think its ok to set this to false and everything seems to work ok now. &lt;/P&gt;&lt;P&gt;Thanks again &lt;/P&gt;&lt;P&gt;Jon</description><pubDate>Sun, 01 Mar 2009 08:27:43 GMT</pubDate><dc:creator>Jon Neale</dc:creator></item><item><title>RE: ChildForm BO Becomes Dirty Even though I havent changed anything</title><link>http://forum.strataframe.net/FindPost22133.aspx</link><description>Hi&lt;/P&gt;&lt;P&gt;Thanks for your reply. &lt;/P&gt;&lt;P&gt;I have compared what i've done against the stratflix sample and cant see anything obvious. I think I have two different problems one is that for some reason the bo of the childform is dirty without me making any changes on the form. I have seen a thread about datepickers causing issues so maybe need to look at this a bit more. &lt;/P&gt;&lt;P&gt;The other is the cancel button. I thought, and from the look of the Strataflix sample, the cancel button just drops you back to the parent form ignoring if any changes have taken place. I cant seem to get it to do this.&lt;/P&gt;&lt;P&gt;This is what I have in the Cancel Button click event:&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;DialogResult = System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;DialogResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.Cancel;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I am only a newbie, just trialing the product, so its not the end of the world just like to know what I'm doing wrong. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your feedback.&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sun, 01 Mar 2009 06:18:10 GMT</pubDate><dc:creator>Jon Neale</dc:creator></item><item><title>RE: ChildForm BO Becomes Dirty Even though I havent changed anything</title><link>http://forum.strataframe.net/FindPost22132.aspx</link><description>Hi John,&lt;/P&gt;&lt;P&gt;Please take a look at the StrataFlix sample application which make heavy use of the ListView and then you can compare with your code.&lt;/P&gt;&lt;P&gt;Basically it will depend on the code you have in the Cancel/Ok buttons and where are you actually saving/undo the data, it could be at the childform or parent form level.&amp;nbsp; Also at the form the is a property named AutoShowSaveChanges which controls if the message will be shown when saving, but in your case I am sure you don't want to auto save the record, so if that is the case post your code for the OK/Cancel button and also check the StrataFlix code it will reveal many things.</description><pubDate>Sat, 28 Feb 2009 13:39:04 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>