StrataFrame Forum

Child Object in Maintenance Form is not editable

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

By Leonard P. - 10/13/2008

Hello,



I added a child object to the primary object on the SF maintenance form. But it looks like the child object doesn't participates in form's edit. When user clicks "Edit" button in the maintenance form's toolstrip, Child object's text boxes don't become editable. I checked and set all the relevant BO properties (e.g. IncludeInFormEdit).

What else do I need to do?



Thank you.
By Ivan George Borges - 10/13/2008

Hi Leonardo.

Have a look at the Form Include settings. Here is an explanation from the help file:

By Leonard P. - 10/13/2008

Thank you. So, IncludeInFormEdit property does not help me here. How do I make child object editable in the mainenance form?
By Ivan George Borges - 10/14/2008

Well, I think it might help you a lot. Did you check the IncludeInForm properties in the form? Besides the BO ones, you will find the properties you could see on that text from the help file. By default, it is only PrimaryBusinessObject, so you could try setting to AllBusinessObjects.
By Trent L. Taylor - 10/14/2008

Yeah, Ivan is going down the right road here.  The problem is that the child BO is not in an Edit mode...you have two options here:

  1. Ignore the edit mode altogether by setting the ManageUiReadonlyState to False on the BO
  2. Do what Ivan is telling you and use the IncludeInForm properties (or manually call Edit) on the child BO.

Any of these options would work.

By Leonard P. - 10/14/2008

Thank you all, After all I went with option 1, and got rid off Edit button all together.

It works best for our app in terms of design and usability.



  1. Ignore the edit mode altogether by setting the ManageUiReadonlyState to False on the BO






Thanks Trent!



One last question (on this topic at least Smile ), when user changes any field which causes IsDirty state to change, "Save" and "Undo" buttons don't get enabled automatically on the Maintenance toolstrip. So, I am handling it programmatically in IsDirty_Changed event of BO. Is this the right approach? Can I make maintenance form handle it for me?



Thanks.


By Trent L. Taylor - 10/14/2008

No.  If you are using the MaintenanceFormToolstrip, they will not automatically change states.  If you look at the StrataFlix sample, you can see that in this case they do automatically show up (Save and Undo) but the MaintenanceFormToolstrip is not used.  So in this case, you will have to manualy set the states by handling the IsDirtyChanged event of the BO if you are going to take this route.
By Edhy Rijo - 10/14/2008

Trent L. Taylor (10/14/2008)
  1. Ignore the edit mode altogether by setting the ManageUiReadonlyState to False on the BO
  2. Do what Ivan is telling you and use the IncludeInForm properties (or manually call Edit) on the child BO.

Leonard, I think that option 2 may be the one you need in which you will code less than setting the toolbar button state yourself.