BusinessObject still dirty after denying save at prompt?


Author
Message
S. Brandon Keller
S. Brandon Keller
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 33
Hi all,



I am just getting started with StrataFrame, so I suspect that I'm just missing something straightforward; if someone can point that out, I'd sure appreciate it. Smile



I have a main form with a ListView and a BusinessObject which controls the data displayed. I placed an Edit button on the form, and hooked that to the EditObject property on the ListView. I then added a ChildFormDialog and set the translation to allow users to edit the values in the ListView. I am using the MessageItems.CopyDataFrom(...) method to get the data into the ListView and then to the ChildForm.



Everything is working well; the ChildForm is in edit mode when opened, and the BO is marked as dirty, as I would expect. I can Save, Undo, and Edit with the toolstrip, and everything works just fine. However, if I close the ChildForm with edits pending, and then click 'No' on the 'Save Changes' dialog, the BO in the main form remains dirty. I had expected that clicking 'No' on the 'Save Changes' dialog would trigger the Undo action, but hooking into the event for that has confirmed that the business object Undo is not being called. When the form closes, even after denying the save, the BO is dirty and still in edit mode.



Am I missng something simple?



Thanks!
Reply
S. Brandon Keller
S. Brandon Keller
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 33
Hi Edhy,



Thanks for the response. I'll dig through the StrataFlix sample and see if I can find anything that points the way. I had noticed the AutoShowSaveChangesMessage option and it's been mentioned in forum posts before, but I actually don't want to handle the events on the main form; it's for display only. My ideal scenario is that the ChildForm would handle the data events, but leave the BO in a clean state when finished - either the user saved the changes, explicitly hit 'Undo' before closing the dialog, or hit 'No' on the save confirmation prompt when closing the dialog.



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