Ok,
I've searched high and low about this issue and have not found anything satisfactory up to this point.
I have a collection of very simple editable child objects which I'm binding to a devexpress xtragrid. Almost everything works fine. Reading Lhotka's book is my understanding that one has to be able to completely undo all changes made to a collection before it is commited to the db.
How does one handle undo for a BusinessCollectionBase descendant? I'm trying to BeginEdit upon a button click and doing a CancelEdit on another button. In beetwen there will be inserts, modifications and deletions to the collection. I want to be able to undo all and any changes made to the whole collection. At present I'm able to succesfully insert, change, delete records and commit them to the db.
I've placed an Undo button on the same form as my grid and what I get is the undo of a single record not the whole collection as intended. I can see that the grid is calling BeginEdit and CancelEdit anytime I move from record to record on the grid. But my initial BeginEdit should be able to record the initial state of the collection and my manual CancelEdit should restore it.
I've read many threads on searchcsla.com and also here but have not found a simple solution to this seemingly simple issue. Is it a complicated thing? Having read the book it does not seem that it would be very complicated to do.
As far as I can tell this issue has been discussed many times and I would not be bringing it up if I'd found an answer to it; hence my post.
I'm still having to use version 1.52 of the CSLA framework.
Regards,
Mario Estrella
Ahhh ... so correct
Thanks Rocky ... you've made my day.
I said it before and I'll say it again:
Thank you Rockford Lhotka for sharing your experience and wisdom. You are a great individual for doing this.
Regards,
Copyright (c) Marimer LLC