Click here to Skip to main content
14,105,616 members
Rate this:
Please Sign up or sign in to vote.
See more:

so I'm trying to get the thing described in the title working. I have my database called customerDB with two tables in it, customerdata and contacts. I want to populate the combobox with the values of the columns FirstName and LastName from all rows in the table customerdata. I've tried a few different solutions, yet none of them add anything to the combobox. This is what I currently have, help would be greatly appreciated

What I have tried:

using (customerDBEntities c = new customerDBEntities())
    comboBox1.ValueMember = "PKCustomer"; //Primary Key of the customerdata Table
    comboBox1.DisplayMember = "FirstName" + "LastName";
Richard MacCutchan 17-Apr-18 7:11am
I am no expert, but I think you need to add a BindingSource to the ComboBox to get it populated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.190518.1 | Last Updated 17 Apr 2018
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100