Multiple values in DisplayMember of DatagridViewComboBoxColumn

3.1k 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 best solutions below

0
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