Cant see children


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I'm trying to set up a Child Form.I 've set up the Parent and Child Business Objects. I've dropped both on a SF Maintenece form. I've set up a PageFrame , one of the tabs is the Child Form. I have dropped a BusinessBindingSource on the form and set its datasource as the child bus object. I have also set the ParentBusinessObject of the childbuiness object on the form.I am displaying all fields in the child.

As I naviagte through the patrent, I would expect to see the childdren in the grid, as the parent is navigated to...but nothing is appearing in the child grid.

Should this behaviour be automatic, or is there someting I need to do to 'GET'the children into the grid ?

Reply
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (06/09/2008)
Edhy is correct. You will just need to create your own Fill method to load the records that you need based on the specified parent record. So just create a Fill method on the child BO and call that Fill method on the Navigated event.


Hi Gerard,



Here is a code I use in a child BO:



Public Sub FillByPolicy(ByVal FK_Policy As Integer)

Using cmd As New SqlCommand()

cmd.CommandText = String.Format("SELECT * FROM {0} WHERE FK_Policy={1} ", Me.TableName, FK_Policy)

Me.FillDataTable(cmd)

End Using

End Sub





After creating this method, compile your BO library or your solution then use that method instead of the FillByParentPrimaryKey().


Edhy Rijo

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