Scenario: . I move the application from access to C # and on one of the forms (in access) the user can select a drop-down list that has 3 columns (ID, First Name Last Name). After selecting from the list, the ID is displayed in the drop-down list.
Question: Is it possible to recreate this functionality using the combo box? What alternatives can you offer?
EDIT:
alt text http://www.freeimagehosting.net/uploads/7acfb7bb8b.jpg
The drop-down menu is in the upper left corner, next to it is a text field that uses the name of the last two columns of the drop-down menu
EDIT 2:
Since multiple columns arent valid, is there a way to tell mutiple displaymembers to display in the drop-down list instead? For example: ID - FirstName LastName
Currently, the employee object is added to the drop-down list with these properties. I tried setting the displayed item to
cmbEmp.DisplayMember ="EmployeeID " + "FirstName " + "LastName";
but this is not so. Should I give up using the employee object and just make an SQL call, capturing the bound together? I tried to reuse some code (I was provided with this project halfway through its completion), but it may not be possible.
source
share