Browser Dialog: Fill combobox based on parameter of another combo


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
You're welcome. Cool
Jéssica Neves
Jéssica Neves
StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)
Group: Forum Members
Posts: 14, Visits: 102
thank.

 Ivan!!!
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Jéssica.

You will basicaly use the Search Field "Combo - Business Object" tab and set the Combo Population.

On the Search Fields dialog, Edit the search field and set it to your foreign key:



Then, under Combo - Business Object, configure the List Population Settings to use the BO you want and its Fill Method to bring the rows you want the combobox populated with:



Also, have a look at the help file under : "Application Framework" / "UI Layer" /  "Controls" / "Browse Dialog" / "Working with the Browse Dialog" / "Setting the Search Fields".
Jéssica Neves
Jéssica Neves
StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)StrataFrame Beginner (16 reputation)
Group: Forum Members
Posts: 14, Visits: 102
Hello!
I have a table of documents.
Documento_ID
this table have a foreign key to the table people.
Documento_Pessoas_ID
 
so I'm using a browser dialog ..
 
how do I bring the name of the person that is in the document
 
I would have to use the property search fields, Comb - business object?



have any examples to show me?

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (09/24/2008)
... and I am answering forum posts from my wife's laptop)

That is a great excuse. Tongue  Just kidding Hehe

I will try to setup a sample test with the SF sample database, there is not rush on this one, so it can wait.

As for the SearchValueChanged, this is correct and where you will want to place your code...it has actually been here since 1.6.5 I am pretty sure.

Thanks for the confirmation, I got confused trying to get the values, but it is working beautifully and a very powerful functionality.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Honestly without setting this up I can't give you a straight answer off of the top of my head in regards to the sizing.  The sizing of the controls is done when they are created , but they anchors are also set.  You this could be what you are fighting.  But without setting up a quick sample I don't remember (and I am answering forum posts from my wife's laptop).  I will try and look at this over the weekend or something. 

As for the SearchValueChanged, this is correct and where you will want to place your code...it has actualy been here since 1.6.5 I am pretty sure.

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,

I think I figured out by using the SearchValueChanged event.  Could you please check this out to see if it is correct?

Private Sub ServiceCallsBrowserDialog_SearchValueChanged(ByVal sender As System.Object, ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogSearchValueChangedEventArgs) Handles MyBase.SearchValueChanged

     '-- When a customer is selected form the combobox, then requery the Building combobox.

     If e.SourceSearchField.Key.Equals("FK_Customers", StringComparison.OrdinalIgnoreCase) Then

          Dim comboListPopulationParam1 As Integer = 0

          '-- If the customer combobox has any selected record, then update the

          ' comboListPopulationParam1 with the Customer PK

          If CType(e.SourceControl, ComboBox).SelectedIndex > 0 Then

               '-- Resize the combo to properly show its information.

               e.AllVisibleSearchControls("FK_Buildings").Width = 300

               comboListPopulationParam1 = CType(e.SourceControl, ComboBox).SelectedValue

          End If

          '-- Requery the Building Address combobox.

          CType(e.AllVisibleSearchControls.Item("FK_Buildings"), ComboBox).Requery(comboListPopulationParam1, MicroFour.StrataFrame.Business.BusinessEditingState.Idle)

     End If

End Sub

Also, the Building Address ("FK_Buildings") field combobox is not sized properly, the field type is an Integer, but the size of the combo is not enough to show the data correctly, so I am using e.AllVisibleSearchControls("FK_Buildings").Width = 300  here to at least re-size the combo when the Customer record has been selected, but that is not the correct way.  Is there a way to set the size of any control in the Browser Dialog programmatically?

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,

I though this functionality was added to the framework at some point, if so, how would I get access the value of a search field in the browser dialog?

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, I will add it to our future enhancement list to look at.  Thanks Smile
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Trent L. Taylor (10/19/2007)
This is probably a good enhancement request.  Sorry Ermm

Hi Trent,

Thanks for the response, even thought it is really sad for me.  Do I have to enter this in the enhancement request forum, or you will take care of it for me? Tongue

I do like the way you guys design the Browser Dialog, but more hooks and flexibility are needed in there in order to allow the developer to cover more custom request by the application.  So more events and access to the controls PEMs in the browser will enable this flexibility for us.

I would like to be able to do something like this:

Me.ServiceCallsBO1_BrowseDialog.SearchFields("FK_Customers").Value

Me.ServiceCallsBO1_BrowseDialog.SearchFields("FK_Customers").Requery()



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