ChildFormDialog in user control


Author
Message
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I tested but I hit error if I don't place the same BO at parent form.



Currently, I already set BO in my user control for BO translation.

businessObjectTranslationItem1.SourceBusinessObject = "AddressInfo.countriesBO";





And I checked the source code, ChildFormDialog.CreateForm(), it always refer to ParentForm to get BO.



'-- Get a reference to the business objects

loSourceBO = GetBusinessObject(_ParentForm, lcSource)





Am I missing something?
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
Ah, yes, the _ParentForm references a BaseForm object rather than an IContainerControl object.  Are you trying to create an inherited ChildFormDialog that can be dropped on a user control as well?  If you do not need the same business object on the parent form, then you probably don't need to use the ChildFormDialog, just show the child form normally using form.ShowDialog().
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I don't need the same BO at my parentform. But I need the same BO in my user control.

So, do I need to use childformdialog in this case?



Please advice.

Thank you
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
If you are only modifying a single record in the child form, then I would not use the ChildFormDialog and just pass the PK of the record to the child form's constructor.  Then, the BO on the child form can call FillByPrimaryKey() and work with it's own copy of the record.  If you're passing over lots of records, then you'll need to put the BO on the form and map it as well.
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