Child Form and ChildFormDialog Questions


Author
Message
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I have a parent form with a listview of people (working). Now I need to add some child Bo's and some child forms that will be called by childformdialogs. First can you have more then one Child Bo on a form? This question was asked on the forum before but I never found an answer.

Second, if you just want to show the persons name from the parent BO and parent form, on the child form so the user will have a reference to who they are working on. Is that possible? Some how you would have to have a reference to the parent BO.

TIA.

I had a problem wording this so if I am not clear let me know. Again Thank you.
Reply
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Sounds like a bootstrap problem to me Smile. Try re-binding the BBS to the BO in the OnLoad of the child form and see what results you get.

So, something like:

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //-- Rebind my BBS to the BO        
            MyBBS.BusinessObject = MyChildBO;     
        }

You may also need to requery your grid to re-pull the data from the newly re-bound BBS after you do that.

Basically, what I think is happening is that the BBS (and therefore the grid) is getting bound to an empty instance of the childBO.  The ChildFormDialog then creates a second instance of the childBO populated with the data from the parent form. Since the BBS is never updated to point to this new, populated instance, the data is not being reflected in your grid.

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