StrataFrame Forum

Option in Form to always stay in edit mode.

http://forum.strataframe.net/Topic14096.aspx

By George Nentidis - 2/6/2008

It would be nice if the StandardForm had some kind of a boolean property to always stay in edit mode. Now after Save, the form always returns in ReadOnly mode until you press (or call) Edit again. Being the form in ReadOnly mode looks strange to our customers, since they have used forms to be editable. So we always have to call Save and Edit together. This sometimes messes with the focus of controls and we have to write the same code all over again in all our forms.

It would be nice if this was an option.

Thanks

By Greg McGuffey - 2/6/2008

You could probably do this now. The editing state is really just a UI thing. If you set all the bound controls to IgnoreManageReadonlyState = True and used your own toolstrip with save/undo/delete that called the methods on the BO (not the form) I'm guessing you'd be pretty close. You'd probably want to handle the IsDirtyChanged event (which I think is newish..couldn't find it in the SF source I have) to update your toolstrip buttons. At least this is what I'd try.



Of course, this doesn't negate the enhancement request, just some thoughts if you need this NOW. BigGrin
By Trent L. Taylor - 2/6/2008

You can also set the BO property ManageReadonlyState to false versus each of the bound controls, but if you only want to keep one or two controls in edit mode, then you could use the IgnoreManageReadonlyState property of the control.

In our medical software the fields are always enabled and we use the IsDIrtyChanged event of the BO to enadle or show the Save/Undo buttons.

By George Nentidis - 2/8/2008

Ok, this worked really nice

Thank you.

By Trent L. Taylor - 2/8/2008

Glad to hear it Smile
By StarkMike - 5/5/2008

How does changing the ManageUIReadOnlyState effect the EditingState Property? From my initial testing it seems like the EditingState doesnt change after ManageUIReadOnlyState is set to False.
By Trent L. Taylor - 5/5/2008

It doesn't.  It just doesn't update the readonly or enabled state of the controls when the editing state changes. 

If you want to know when a user enters a value, you can still handle the EditingStateChanged event...but better yet, use the IsDirtyChanged event.