Link to home
Start Free TrialLog in
Avatar of scm0sml
scm0sml

asked on

using 2 fields as a listbox display member

I have:
lstDept.DataSource = ReportHelper.GetDepartments
        lstDept.DisplayMember = "DepartmentID"
        lstDept.ValueMember = "DepartmentID"

Thsi works fine.

Is there a way of using the two fields as the display though so say:
lstDept.DisplayMember = "DepartmentID" & " - " & "Department"
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

you have to do it in your SQL query
Avatar of scm0sml
scm0sml

ASKER

Its not really an option for me so does that mean the answer is no this can't be done?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial