| | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 07/22/2008 11:48:33 AM Posts: 23, Visits: 129 |
| | In a maintenance form, I have a method to check the IsDirty property of the business object and prompting the user to save changes if IsDirty is true. If the BO is in edit mode and without making any edits to the bound fields, IsDirty is returning true when I close the form while in edit mode. Is this the desired behavior for IsDirty? Or should I look at another property or method to determine if changes have been made? Thanks!!
____________________ Programmer/Analyst Captain D's, LLC |
| | | | StrataFrame VIP
       
Group: StrataFrame Users Last Login: Yesterday @ 12:10:08 PM Posts: 1,327, Visits: 3,471 |
| | There is a property for BOs in the Strataframe: Business Layer Settings called SetDirtyOnEdit. My guess is that if you set this to False, then it will only be marked dirty when an actual edit is made. (I haven't messed with it yet, so this is just a guess). |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 07/22/2008 11:48:33 AM Posts: 23, Visits: 129 |
| That's it. Setting SetDirtyOnEdit to false gave me the desired behavior. Thanks Greg!
____________________ Programmer/Analyst Captain D's, LLC |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 9:49:13 AM Posts: 4,796, Visits: 4,767 |
| | Keep in mind that you can have some side-effects from doing this though. Your MaintenanceFormToolstrip will not properly reflect your edit mode since the EditingStateChanged event did not change. Another option here is to turn off the auto-prompting: MyForm.AutoShowSaveChangesMessage = False This is another direction. Just FYI |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 07/22/2008 11:48:33 AM Posts: 23, Visits: 129 |
| I see now. But setting SetDirtyOnEdit back to true, my toolbar still doesn't get notification. After going into edit mode ALL the buttons disable. How do I get them back?
____________________ Programmer/Analyst Captain D's, LLC |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 9:49:13 AM Posts: 4,796, Visits: 4,767 |
| | If you click the Undo or Save the buttons should be reset if you are using the default IncludeInForm settings. If you have modified the IncludeInForm settings to determine which BOs are navigated, edited, added, etc. then you can change the behavior of the MaintenanceFormToolstrip. |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 07/22/2008 11:48:33 AM Posts: 23, Visits: 129 |
| Once I click Edit, ALL the buttons are disabled including Save and Undo.
____________________ Programmer/Analyst Captain D's, LLC |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 9:49:13 AM Posts: 4,796, Visits: 4,767 |
| | It sounds like you have some of the IncludeInForm settings changed. What are the settings of your IncludeInForm properties on the form and on the business objects?
|
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 07/22/2008 11:48:33 AM Posts: 23, Visits: 129 |
| D'oh. For some reason my IsDirtyOnExit changing back to true didn't take. I just wasted support points.
____________________ Programmer/Analyst Captain D's, LLC |
| | | |
|