Completely confused about how parent/child BOs interact


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I have a parent and a child BO on a form. The form needs to take some actions after the child BO has navigated, so in the Navigated event of the child BO, I'm referencing a control. However, I'm getting an error that the control doesn't exist (the reference is nothing) and after much head banging, I realized that this is being run during InitializeComponent! Most likely the control hasn't even been initialized yet. The child BO is configured to have the parent BO and the parent is configured to MatchCurrentRow. I thought I had to manually load BOs during load or in the constructor (after InitializeComponent), and now I find the child is loading during InitializeComponent. What's up? BTW, I have simular needs in the parent BO, which is working just fine.
Replies
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I got this to work by unhooking by grid from the BBS, manually clearing the BO's filter after the ChildAutoFilterOption gets set to "Off", importing my records and then reset the datagrid's source to the BBS. I would think that setting the ChildAutoFilterOption to Off would clear the BO's filter, it does not. Did I forget to set/call something or working as intended?



Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Hmmmm...it technically should. I would be curious as to what else could be going on. If you are going through a BBS then I would recommend against using the auto-filter options, especially if you are connecting to a grid as the IBusinessBindable could be fighting against you here. The IBusinessBindable interface supports a filter as well, so there could be a potential conflict there if you are using both.



At any rate, glad you got it going.
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