N-Level Undo Problem in Windows modal forms using CslaActionExtender in main form

N-Level Undo Problem in Windows modal forms using CslaActionExtender in main form

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


saeedsamie posted on Thursday, October 15, 2009

Hi everyone

I'm using Csla 3.7.... and I found it very difficult to apply n-level undo approach in modal forms while CslaActionExtender handles BindingSources. I tried many ways of handling bindingsources but I could not find a good soution for it. Actually n-Level Undo is not an easy task in Windows forms anyway. It may be improved in later versions but  I wonder if anyone has a solution for it now.?


JonnyBee replied on Thursday, October 15, 2009

Hi,

I would not recommend to use CslaActionExtender in Modal forms. I prefer to control the Bind/Unbind process and N-level undo manually in Modal forms.

I also prefer to set DialogResult in code - so that the user can remain in the form if save fails rather than always closing the form as CslaActionExtender does not set any DialogResult.

saeedsamie replied on Friday, October 16, 2009

Hi JonnyBee

Thanks for your recommendation. I actually have a root BusinessBase which have a Child List which I want to be changed by user whenever is needed in a modal form. I prefer to give the user the ability to decide if he wants to accept or cancel changes to the List. But I receive editlevel mismatch error returning to main window. Would you please send me a template of the code which mannually handles this problem?


griffta replied on Tuesday, November 17, 2009

I'm also having problems with this, i'm banging my head against a brick wall.

I have a root BO with a child list. I want to edit the child items using a modal form. I'm not using the CSLAExtender Controls, instead i'm using the BindingNode in the child form to handle the unbinding. I've tried so many combinations, but still get a editlevel mismatch when saving the root object.

I really could do with any advice!

Copyright (c) Marimer LLC