Click here to Skip to main content
15,889,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello.i have a combo box which should show 3 column value from table e.g,"id","name","lname" in windows form application in c#
C#


what i do?
Posted
Updated 15-Dec-14 0:31am
v2

 
Share this answer
 
Before binding to combobox, create new field (lets call it fullName) and bind it to DisplayValue

SQL
SELECT id, name, lname, fullName = '(' + id + ') ' + name + ' ' + lname FROM your_table


If you're using some class, collection or other type of binding, you have to adjust the above SQL example to your particular bind method.

If this helps please take time to accept the solution
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900