Hi Juan,Let me see if I understand your situation here:
You need to show items in the ListView for Products that are flagged as Kit, right?
If so you need to do the following in the ListView:
- Set the Listview1.PopulateOnFormLoad = Manual
- Set the Listview1.PopulateDataSourceSettings to CopyDataFrom(BusinessLayerBase,BusinessCloneDataType)
- In the ListPopulating event, set the Parameters as follow:
e.Parameters(0).Value = Me.ProductsBOe.Parameters(1).Value = MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromDefaultView
Now in the ProductsBO.Navigated event put code to filter the listview data and requery the ListView as needed, something like this:
If
Me.ProductsBO.Count > 0 Then'-- Filter all the order items for the current Order PKMe.ChildBO.Filter = "KitFlag=" & Me.ChildBO.KitFlag.ToStringEnd If' Force the ListView to Requery to Enable/Disable its toolbarMe.ListView1.Requery()
This is just one approach to give you an idea, of course if the child BO may have a lot of record for the same parent, then instead of using the CopyDataFrom method in the PopulateDataSourceSettings you can create a method in your ChildBO with a parameter to get the data related to the parent with the KitFlag value, and you set those values as parameters in the ListPopulating Event.