I have DatagridViewComboBoxColumn bound to a datasource, i want to show "First Name" + "Last Name" in list and display member. How do i do that?
Asked
Active
Viewed 3,064 times
1
-
In that case You need to fill the ComboBox manually. – Shekhar_Pro Feb 05 '11 at 09:54
-
I have created another table adapter with concatenation query – SMUsamaShah Feb 05 '11 at 10:22
1 Answers
4
Add a property to the datasource that exposes "Name". Have the "Name" property return the "FirstName" + "LastName".
Bind to that property instead.
If the datasource is SQL, use SELECT FirstName + LastName AS 'Name' FROM table

Marc Johnston
- 1,276
- 1
- 7
- 16