How to configure BOs not to chage "isDirty" to true even if user makes changes


How to configure BOs not to chage "isDirty" to true even if user makes...
Author
Message
Leonard P.
Leonard P.
StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)StrataFrame Novice (81 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Hi,

I need to give users ability to change values in some controls databinded to certain BOs , but I don't want to save those changes to the database. I set all the properties IncludeInFormEdit, IncludeInFormSave, etc to false, as well as SetDirtyOnEdit. Save button is disabled when users make changes to these BOs, but when form is being colsed "Save Changes" messagebox still comes up.



Is there a way to turn off IsDirty change? I could just call RejectChanges() before form closes, I am just wondering if there's a property or something built into the framework that would let me do that.



Thanks
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Leonard.

I guess you would have to set the form's AutoShowSaveChangesMessage to False and deal with saving the BOs contents yourself when closing. Otherwise, if you enter into Edit mode, the save message will be shown regardless the BO state.

Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
The simplest solution I have found is to either set the form’s AutoShowSaveChangeMessage = False or call the BOs Undo or RejectChanges method in the form’s FormClosing event. 

-Larry 

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search