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



NumericUpDown odditiesExpand / Collapse
Author
Message
Posted 10/11/2006 12:20:02 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
Posts: 77, Visits: 804
Hello All! Here's a puzzler:

As the user adjusts the bottom 6 fields, the repeat exposures are updated to reflect the total of all the repeat reasons.

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).

These updates are performed using a common event handler:

private void nudAllRepeats_ValueChanged(object sender, EventArgs e)
{
  txtRepeatExposures.Text =
Convert.ToString(nudEquipment.Value + nudMotion.Value + nudOther.Value + nudPosition.Value + nudTooDark.Value + nudTooLight.Value);
}

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.

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.

Any ideas on why this is happening?

 

Post #3503
Posted 10/11/2006 12:48:37 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 1:09:23 PM
Posts: 2,686, Visits: 1,888
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.


www.bungie.net
Post #3506
« 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 9:54am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 9 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.