StrataFrame Forum

More BO Problems

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

By Daniel Essin - 5/10/2006

I'm in the BO PropertyGrid trying to set the parentBO and it says this must be set in the instance. So I go to the instance and try to set the parentBO and it says I must set it in the class properties.



Catch-22



What next?



and btw, how can I switch the parent on the fly?
By StrataFrame Team - 5/11/2006

Yes, you can set the ParentBusinessObject property at runtime and change it on-the-fly. 

The error message you're getting when trying to set the instance is tricky: it's not telling you that you need to set the ParentBusinessObject property at the class level, but it's telling you that you need to set the ParentRelationship property at the class level so that the type editor for the ParentBusinessObject at the instance level knows what type of business object to allow you to set.  If you have already set the ParentRelationship property, then make sure you build the project/solution before trying to set the ParentBusinessObject property.  If it still informs you that the ParentRelationship property isn't set, then you might have to restart Visual Studio and re-open your project.  This is a pain, but we use the VsTypeResolutionService which is part of Visual Studio, and sometimes it gets a little out of whack and doesn't stay up to date.

By Daniel Essin - 5/11/2006

can i set ParentRelationship on the fly?
By StrataFrame Team - 5/11/2006

Yes, you can set the parent relationship on-the-fly as well.  You can either set the properties on the object returned by the ParentRelationship property or you can create a new BusinessParentRelationship object and set the ParentRelationship property to that value.