Pattern for saving objects without N-Level Undo

Pattern for saving objects without N-Level Undo

Old forum URL: forums.lhotka.net/forums/t/4142.aspx


mr_lasseter posted on Thursday, January 10, 2008

What is the correct pattern for saving an object in Winforms without using N-Level undo?  Is it enough to set DisableIEditableObject to true and not call BeginEdit and ApplyEdit?

 

Thanks,

Mike

 

RikGarner replied on Thursday, February 07, 2008

We don't use n-level undo in several areas of our application. Don't sweat it - just ignore ApplyEdit and BeginEdit and call Save when you've updated your object.

RockfordLhotka replied on Thursday, February 07, 2008

mr_lasseter:

What is the correct pattern for saving an object in Winforms without using N-Level undo?  Is it enough to set DisableIEditableObject to true and not call BeginEdit and ApplyEdit?

Yes, that should be correct. Just don't try to use in-place editing in a grid. It will work to a point, but some grid concepts require IEditableObject and so obviously can't work.

Copyright (c) Marimer LLC