Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MmCombobox binding question
Message
 
To
22/07/2003 05:12:10
Ali Ihsan Turkoolu
Galaksi Bilgisayar A.Þ.
Ankara, Turkey
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00812258
Message ID:
00812400
Views:
11
Ali,

>I have a Cities business object build on cities table which has two fields: city_id and city_name.
>
>I have a Customer table which has HeadOfficeCity_id and ShipCity_id fields.
>
>Using Cities business object as two different combo boxes, How can I control the HeadOfficeCity_id and ShipCity_id fields on the same form?

You can use a single instance of the Cities business object as the binding source to fill the two combo boxes, specifying the display member and value member. You can then bind the comboboxes selected value to the Customer business object, specifying the two different value members. For example:

1. HeadOfficeCity combo box:

BindingSource: Cities
BindingSourceDisplayMember: city_name
BindingSourceValueMember: city_id

BindingValueSource: Customer
BindingValueSourceMember: HeadOfficeCity_id

2. ShipCity combo box:

BindingSource: Cities
BindingSourceDisplayMember: city_name
BindingSourceValueMember: city_id

BindingValueSource: Customer
BindingValueSourceMember: ShipCity_id

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform