Combo Box with Custom method


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 have a Combo Box on a form, based on a Business Object. In PopulationdataSourceSettings, I have the MethodToExecute as MyFillByCode. This is a Method I have set up in the Business Object which takes one parameter. In the PopuationDataSourceSettings, it comes up as MyFillByCode(String). What I want is something like MyFillByCode("MyValue") but can change the String.

Because the parameter is not set, the form gives an error on instantiation. Where/how do I pass the method the parameter.

The parameter will not change once the form is loaded. I am using the Combo Box to lookup a table with Codes and Descriptions and store all Codes and descriptions in one table (e.g. Countries, Areas, reps, Groups) . One of the fields in the table identify the type of Lookup, and this is the parameter I am trying to pass. I could have a no. of simular Combo Boxes on the same form , each one for a different lookup.

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
Gerard O Carroll (10/28/2009)
If I wanted to set the parameter from another control, do I just



MyBoFillByValue("MYVALUE"); MyCombo.Reqyuery(); from the other control and change PopulateOnFormLoad to manual ?



This does not sound right as I am setting the MyValue in the ListPopulating event as well ?




You are right, it does not sound right. In my sample the parameter passed is a BO.Property value but it could be any variable you want to use. From other places you simple update that value and call the combobox.Requery() which will run the assigned method and will look for the parameter value in the ListPopulating.



I know it is hard to believe it is that simple w00t

Edhy Rijo

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
Hi Edhy and Greg....thanks again for your replies.

I'm happy that I understand the way Combos are populated now by Strataframe

Regards,

Gerard

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