Manually pop combo and pass params


Author
Message
Howard Rybko
Howard Rybko
StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)
Group: Forum Members
Posts: 1, Visits: 2
Hi

I am new to this stuff and I used this post http://forum.strataframe.net/Topic2062-7-1.aspx?Highlight=fill+combobox to work out how to manually pop. a combobox. Took me more time than getting a whole app running!

Now I cant seem to find a way pass a param to the fill procedure.

Please help.

Thank you

Howard

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
There are two ways to pass parameters to the method selected in the ListPopulationSettings to fill the list via a BO.



The first is to simply pass the parameters to the Requery() method. I.e. if you have a fill method that takes two parameters: FillByAccountDate(accountID As Integer, txDate As Date), you would use a requery like this: Requery(theAccountID, theTxDate). This is generally fine if you are only calling the requery method from one place in code.



If you call it from more than one place (a frequent situation), you'd hand the ListPopulating event of the listbox/listview. The event arg has a property called Paramters, which is an array of objects. You load the parameters here. I.e.



Private Sub lstAny_ListPopulating(ByVal e As Microfour.StrataFrame.UI.ListPopulatingEventArgs) Handles lstAny.ListPopulating

e.Parameters(0).Value = theAccountID

e.Parameters(1).Value = theTxDate

End Sub




This gets called just before the list is populated and fills the parameters that are passed to the fill method.



I hope this helps.



NOTE: I just typed this in, so the code might not be 100%, but hopefully you get the idea.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Way to go Greg Smile  You're on top of things.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
It's just exciting that I actually know the answer sometimes, what with the zillion questions I've asked! BigGrin
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
It's because you've asked those questions that you know the answers Smile  We don't expect you to know things clairvoiantly.
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