StrataFrame Forum

ComboBox

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

By Michael Reese - 9/1/2006

I have a winform with a "boPersons" Business object and table = persons. and a column= IDPerTitles. I populated the form with a combobox and configured it as follows

1. PopulationDataSource = "BoPositionTitles", FillTop100().

2. Diaplay Member = {0}-RecordID,{1}-Description

3 Display Member Formate String = {0},{1}

ValueMember = RocordID which is the recordID of the BoPositionsTitles Business Object.

When I dropdown the combobox I can see the list of position titles. I can also select a title. However, when I return to the form, the combobox displays the first record in the BoPositionTitles object. It appears that the boPersons BO is not being populated with the recordId from the BoPositionTitles object upon saving??

Michael

By Gerhard Jaros - 9/3/2006

I've got about the same problem: If I dropdown I can see the correct data, however if I return to the form, there is no data selected.

...gerhard...

By Michael Reese - 9/3/2006

Ok, I got I forgot the bindingfield. Here is a snippet from a previous thread.

1. Select the country combo box
2. Click the PopulationDataSourceSettings
3. Choose the Country Business Object
4. Choose the method that will Fill the BO with the countries
5. Add the country name as the display column
6. Add {0} to the format column
7. Pick the primary key of the Country table for the Value Member
8. Click OK
9. Make sure that the PopulationType of the combo is set to BusinessObject
10. On the same combo box, select the BusinessObject property to the instance of the Clubes on the form
11. Set the BindingField to the Country field in the Clubes table.

By StrataFrame Team - 9/5/2006

Yes, the PopulationDataSourceSettings are only for the population of the business object and have nothing to do with the binding back to the data.  So, you also need to configure the business object and field to which the combo box's selected value is bound.