Multiple Child BO Relationships


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (05/29/2008)
I'll elaborate more on this in class and show what happens when you leave filters on.  Bottom line, if it is working for you, just leave it alone.

Thanks Trent,

I have a couple of questions for the class already and includes the sorting chapter. Tongue

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Sure Smile
Douglas Riley
Douglas Riley
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: StrataFrame Users
Posts: 21, Visits: 267
Thanks again Trent!
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Since I am using a maintenance form, does my parent business object have to have the IncludeInFormNavigate property set to true in order to coordinate movement?

If you are using a ListVIew (StrataFrame ListView), then you can just set the AutoNavigateToSelectedRecord property to True and set the BusinessObject property to the child BO...then you don't have to worry about the IncludeInForm navigate stuff at all....it is much easier this way.

You will have to be using the 1.6.6 beta to have this new feature.  You can get it here: http://forum.strataframe.net/FindPost16061.aspx

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
but with your suggestion I understand that this property should not be used? or there are specific cases for not using it?

I'll elaborate more on this in class and show what happens when you leave filters on.  Bottom line, if it is working for you, just leave it alone.

The problem comes when you add new records or change a field that is part of the filter...then you will start having strange behavior.  That was my point...secondly, you are going to have more control when you use the above technique over the auto-filter.  The whole point really has nothing to do with the auto-fitler as much as leaving fitlers on.

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (05/29/2008)

[quote]The ChildAutoFilterOption property of the Customer BO is set to "MatchCurrentRow." 

This could be your problem...using this in this scenario could come back and bite you.  Turn this off, ...

Hi Trent,

This is a bit confusing, I have a couple of forms which shows a Parent-Child relation using the ChildAutoFilterOption property, so far, it works fine, I have not noticed any problem yet, but with your suggestion I understand that this property should not be used? or there are specific cases for not using it?

Can you please elaborate on this, to clarify the use of this property.  I may have to go back and change some forms now BigGrin

Edhy Rijo

Douglas Riley
Douglas Riley
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: StrataFrame Users
Posts: 21, Visits: 267
Trent,

Thank you so much! That worked out fine!  Since I am using a maintenance form, does my parent business object have to have the IncludeInFormNavigate property set to true in order to coordinate movement?  Thanks

Doug

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Can a parent BO have two child BO's on the same form and be populated using the functions of Strataframe? 

Sure, I setup one up the other day that had 8-10...with a lot of other foreign keys as well...so this is totally doable.

The ChildAutoFilterOption property of the Customer BO is set to "MatchCurrentRow." 

This could be your problem...using this in this scenario could come back and bite you.  Turn this off, then on the ListView, I assume you are using the CopyDataFrom method and then providing the BO and clone type on the ListPopulating event.  Before you set the e.Parameters(), set the filter:

ListPopulating Event

MyChildBO.Filter = "ForeignKey = " & ParentBO.PrimaryKey.ToString()

e.Parameters(0).Value = MyChildBO
e.Parameters(1).Value = MicroFOur.StrataFrame.Business.BusinessCloneType.ClearAndFillFromDefaultView

Then BE SURE TO CLEAR THE FILTER in the AfterRequery event:

AfterRequery Event

MyChildBO.Filter = ""

Doing this is far safer than leaving a filter on all of the time which can produce a lot of other side-effects (i.e. add a new record and rows change, etc).  Above would be the recommended way to setup this type of environment.

Douglas Riley
Douglas Riley
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: StrataFrame Users
Posts: 21, Visits: 267
I am having some difficulty establishing a relationship from a parent business object to two child BO's on the same form.  I have a customer (parent) business object linking to customer type and customer address business objects (children).  The child information is to be displayed in listviews for each one on a tabbed form.  I have gone through the steps of setting the ParentRelationship property on each child BO to point to the Customer BO.  I have also set the ParentBusinessObject property for each child BO instance on the form.  The ChildAutoFilterOption property of the Customer BO is set to "MatchCurrentRow."  The customer type BO populates its listview and I can cursor through the records and see the proper data.  The customer address listview does not populate.  Can a parent BO have two child BO's on the same form and be populated using the functions of Strataframe?  Any help would be appreciated!  Crazy Thanks!

Doug

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