StrataFrame Forum

Need to diplay foreign value SF Combo control

http://forum.strataframe.net/Topic5564.aspx

By Michael Reese - 1/4/2007

I have combo control for displaying Personnel Table

Personnel Name

Position Title

I need to display the related position title name from the position table instead of position title in the Personnel Table. I am successfully doing this in a listview. However, I need to do this in a combo.

Thanks

Michael

Private Sub VendorContacts_RowPopulating(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.RowPopulatingEventArgs) Handles VendorContacts.RowPopulating

e.Values(2).DisplayValue = BoPositionTitles1.GetRecordName(CType(e.BusinessObject, ORION_BO.BOVendorContacts).PositionTitle)

End Sub

By StrataFrame Team - 1/4/2007

You can accomplish this by changing the method you use to gather the data for the combo box to join in the appropriate column from the other table.  When you specify the display fields in the PopulationDataSourceSettings, you can manually type the name of the column (for cases like this, when a column comes from another table that the designer doesn't know about). 
By Michael Reese - 1/4/2007

I think I understand you however, I created a view and configured my Combo to execute display position titles. The sp executed when the form loaded which was too soon. No data displayed. Do you have an example or any further suggestions?

Thanks Much!

By StrataFrame Team - 1/4/2007

You could possibly move the code to fill the business object to the ListPopulating event handler of the combo box.  You can then change when this event gets fired by chaning the InitializationPriority property on the combo box to position it relative to other objects that require initialization (business objects, other lists, etc.)