More BO Problems


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.
Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
Group: Forum Members
Posts: 235, Visits: 309
can i set ParentRelationship on the fly?
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

Daniel Essin
Daniel Essin
StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)StrataFrame User (339 reputation)
Group: Forum Members
Posts: 235, Visits: 309
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?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search