StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Browse Dialog in a Child formExpand / Collapse
Author
Message
Posted 09/18/2006 12:58:48 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:44:25 PM
Posts: 810, Visits: 11,680
Hya.

I put a BrowseDialog in a child form.

It shows up fine, the search fields are there, the records get listed, but once I choose one and go back to the form, it doesn't position the BO to the chosen record.

Am I missing something? (besides the beautiful windy and sunny day out there)

Post #2877
Posted 09/18/2006 1:01:39 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 10:13:07 AM
Posts: 4,799, Visits: 4,768
You need to set the BusinessObjectToPopulate property on the business object.  This is the BO that gets updated with the results located from the browse when you click the OK within the BrowseDialog.

yup...I would agree that it would be more fun outside today

Post #2878
Posted 09/18/2006 1:07:05 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:44:25 PM
Posts: 810, Visits: 11,680
Trent L. Taylor (09/18/2006)
You need to set the BusinessObjectToPopulate property on the business object. 

It is already Trent.

It is working fine in all the other forms. It's just in this ChildForm that it is not. In the parent of this form, it works fine.

Post #2879
Posted 09/18/2006 1:08:39 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:44:25 PM
Posts: 810, Visits: 11,680
(hope you notice when I say "all the other forms", I'm trying to show off)
Post #2881
Posted 09/18/2006 1:12:27 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 10:13:07 AM
Posts: 4,799, Visits: 4,768
Is the business object that is attached to the browse a translated business object?  This could possibly be a dangerous situation if you are changing the contents of the business object that is managed on the parent form.  However, if the child form has a browse that is not going to kill your parent/child logic you will be fine. 

If you look at the contents of the BO after the browse, does the record actually exist in the BO...first lets make sure that the data made it back.

Post #2882
Posted 09/18/2006 1:14:11 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 10:13:07 AM
Posts: 4,799, Visits: 4,768
(hope you notice when I say "all the other forms", I'm trying to show off)

That's funny!.....I noticed  

Post #2883
Posted 09/18/2006 1:24:01 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:44:25 PM
Posts: 810, Visits: 11,680
Trent L. Taylor (09/18/2006)
Is the business object that is attached to the browse a translated business object?  This could possibly be a dangerous situation if you are changing the contents of the business object that is managed on the parent form.  However, if the child form has a browse that is not going to kill your parent/child logic you will be fine. 

If you look at the contents of the BO after the browse, does the record actually exist in the BO...first lets make sure that the data made it back.

Yes, it is a translated business object.

It is a one-to-many situation. Have the parent, a button there calling the child form. This parent may have lots of kids, so I put a Browse dialog in the child ToolStrip. Then I set the BOToPopulate to the BO in the Child, and its Type. When I go to the Browse and do a Search, the grid gets populated alright. I click the chosen one and go back to the child form, that's when it doesn't show the record I chose, but it stays in the one it was already.

Too confusing? Would you like me to try and explain in Portuguese? You can ask Steve to help in the translation...

Post #2885
Posted 09/18/2006 1:27:20 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 10:13:07 AM
Posts: 4,799, Visits: 4,768
Too confusing? Would you like me to try and explain in Portuguese? You can ask Steve to help in the translation...

LOL...yeah, I'll get him in here to translate for me.  When you return from the browse, does the BO contain the correct data?  It so, try calling the BO.Refresh()...this will force your bound controls to refresh to the current record in the BO.

Post #2886
Posted 09/18/2006 1:36:42 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:44:25 PM
Posts: 810, Visits: 11,680
Trent L. Taylor (09/18/2006)
[quote]When you return from the browse, does the BO contain the correct data? 

Yes, it does, but not positioned in the correct row.

[It so, try calling the BO.Refresh()...this will force your bound controls to refresh to the current record in the BO.

Extremely sorry for the stupid question, but where could I call the Refresh?

Post #2887