In my table, I have a field of firstname and lastname, now what I want is to set firstname and lastname as displaym
firstname
lastname
displaym
Your query should be like this in GetEmployees() function.
"SELECT id,(lastname + ' ' + first_name) AS NAME FROM TABLE" cmbEmployees.DataSource = GetEmployees(); cmbEmployees.DisplayMember = "NAME"; cmbEmployees.ValueMember = "id";