Multiple values in DisplayMember of DatagridViewComboBoxColumn

3k views Asked by At

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?

1

There are 1 answers

0
Marc Johnston On BEST ANSWER

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