Undoable Object, not!

Undoable Object, not!

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


pandelaras posted on Sunday, March 02, 2008

This is probably a silly question, but how do i make a nested (child) object not undoable. The parent is undoable. Do i inherit from another csla base class (at the child), or do i use an attribute? I am having this problem when i have an Editable Child List which i change (i refetch its contents), during the instance of the parent object. Of course i have edit level problems afterwards.

rsbaker0 replied on Sunday, March 02, 2008

It doesn't exactly do what you are asking, but you can resync the edit level of any child fetched after you have started editing the parent to match the parent edit level (basically by calling BeginEdit as many times as required on the child).

This is also needed when doing "lazy loading" of children.

RockfordLhotka replied on Sunday, March 02, 2008

rsbaker0:

This is also needed when doing "lazy loading" of children.

Until version 3.5 anyway Smile [:)]   In 3.5 the child edit level is automatically set to match the parent's edit level when the child is added to or associated with the parent.

pandelaras replied on Monday, March 03, 2008

It seems i cant call beginedit on the child object as i get this exception "beginedit is not valid on a child object". What am i doing wrong?

Copyright (c) Marimer LLC