Results 1 to 3 of 3

Thread: bind combobox

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    bind combobox

    My combo box is populated in th ecodebehind using the cboBox.items.add("ProjectName")

    In xaml, I have set the selectedvaluepath to the ProjectID

    My listbox populates the names of the employees using a datatable which is populated from the database.

    Question:
    Why does the combo box not show the relevant item (ProjectName) for the name I select in the listbox?
    Thanks

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: bind combobox

    'Cause you add just one item with the text "ProjectName" to the combobox.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: bind combobox

    Use the displaymemberpath to project name.

    Check this
    http://social.msdn.microsoft.com/for...0-9ab62aa96448
    thanks
    amrita

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width