|
-
Feb 3rd, 2011, 06:09 PM
#1
Thread Starter
Fanatic Member
populate combobox with names and ids
My database table contains two fields, id and name
What is the way to populate the combobox with the projectnames and have the id of each projectname assigned aswell.
This is required so that if for example, from a list of names in a listbox, a name is selected, then I want the projectname to be selected in the project combobox.
The table returns the name and the projectID
I can populate the combobox with the projectnames from the project table but not sure how to assign the IDs to them.
<pre><ComboBox Name="cboProjects" SelectedIndex="{Binding Path=ProjectID}"
/></pre>
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|