scm0sml
asked on
using 2 fields as a listbox display member
I have:
lstDept.DataSource = ReportHelper.GetDepartment s
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"
lstDept.DataSource = ReportHelper.GetDepartment
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"
you have to do it in your SQL query
ASKER
Its not really an option for me so does that mean the answer is no this can't be done?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.