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 ?

Replies
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
Hi Gerard,

At this point it is better if you post the exact message you are having along with the complete code so we can take a look and see where you may be missing the point.

Also for testing instead of Navigating event use the Navigated and make sure your use the ParentBO.Count>0 as pointed by Guillermo.

Edhy Rijo

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
When you get an error, posting the stack trace is very helpful.  But in this case, it sounds like you are trying to query in one of two circumstances:

  1. You have code somewhere in a constructor of a class (New) or a Load event and it is getting executed at design-time
  2. Or more likely, you are relying on the parent BO to populate the child.  However, there are no records in the parent record, so you get an index out of range exception.  Test on the Count property of the BO before calling the Requery of the child so that the error will not occur.

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