BindingSource in Wizard-like UI

BindingSource in Wizard-like UI

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


lefty posted on Wednesday, May 30, 2007

I've got an application I'm working on and one of the requirements is to keep the UI as similar to the previous application as possible.  The previous application has a wizard-like UI where the user can traverse through screens and fill in peices of the BO at a time.

The  way the original UI works is that when they first view the screen it is in View mode.  They can't edit any of the fields but they can move between the screens to view all the data.  There is a button bar with an Edit button that allows them to put the screen into Edit mode where they can change the data and either Save or Cancel.

Right now I'm using a BindingSource to bind my object to my controls.  The problem I'm running into is that Binding source automatically calls BeginEdit when it binds, which means I have to call EndEdit or CancelEdit before I change screens.  If I'm in Editing mode I typically want to call EndEdit to save any changes before moving on.  If I'm not in Editing mode I want to call CancelEdit to return the edit level back to 0 before moving to the next screen.

Has anyone else written an application similar to this and how do you solve this?  Is there any easier way?

What I would really like to find is a BindingSource control that doesn't start off calling BeginEdit and automatically handles enabling and disabling my controls.  Any ideas?

Thanks,
Jeff

Copyright (c) Marimer LLC