﻿<?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 / WinForms (How do I?)  / NumericUpDown oddities / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Wed, 07 Jan 2009 14:27:51 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: NumericUpDown oddities</title><link>http://forum.strataframe.net/Topic3503-7-1.aspx</link><description>We ran into some strange occurances like this as well with some of our forms in the DDT.  Basically, you want to customize your business object to add the Field Property Changed events (either single event or unique event will do) and move your code from the nud.ValueChanged to the FieldChanged event of the field bound to that control.  Basically, the BindingContext of the form tries to refresh the controls when the data changes, which changes the controls, and it tries to push the data back to the business object causing it to become dirty.  So, just move your handler to the data and you should be good to go.</description><pubDate>Wed, 11 Oct 2006 12:48:37 GMT</pubDate><dc:creator>Ben Chase</dc:creator></item><item><title>NumericUpDown oddities</title><link>http://forum.strataframe.net/Topic3503-7-1.aspx</link><description>Hello All! Here's a puzzler:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/4d636a72-6c36-46f0-93db-902d.JPG"&gt;&lt;/P&gt;&lt;P&gt;As the user adjusts the bottom 6 fields, the repeat exposures are updated to reflect the total of all the repeat reasons.&lt;/P&gt;&lt;P&gt;As the Repeat exposures field is updated, the # Exposures field is updated to Repeats plus a base exposure (based on other settings on the form).&lt;/P&gt;&lt;P&gt;These updates are performed using a common event handler:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; nudAllRepeats_ValueChanged(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;BR&gt;{&lt;BR&gt;  txtRepeatExposures.Text = &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Convert&lt;/FONT&gt;&lt;FONT size=2&gt;.ToString(nudEquipment.Value + nudMotion.Value + nudOther.Value + nudPosition.Value + nudTooDark.Value + nudTooLight.Value);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;If i make changes to any of the repeat reasons and click the save button on the toolbar, the record is saved, but the form stays in Edit mode (the Save and Undo buttons remain enabled). If I click Save (or Undo) the form goes the proper state of Idle.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I've trapped the AfterSave event of the primary BO and checked all the other BOs on the form to see if their state is in edit mode, but all are idle.&lt;/P&gt;&lt;P&gt;Any ideas on why this is happening?&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt; &lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Wed, 11 Oct 2006 12:20:02 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item></channel></rss>