Browse Dialog in a Child form


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
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)

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
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 Smile

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
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.

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
(hope you notice when I say "all the other forms", I'm trying to show off)
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
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.

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
(hope you notice when I say "all the other forms", I'm trying to show off)

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

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
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.Blush

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...BigGrin

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
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.

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
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?

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
It is on the business object.  For example:

MyBO.Refresh()

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