Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CanI (How do I) Make a DataList have multiple fields? 1

Status
Not open for further replies.

THOMASNG

Technical User
May 3, 2002
254
US
Using VB6, I've successfully automatically populated my datalist control from an existing database.
However, this applies for only a single field. Ideally, I wish to simultaneously display three fields, to allow the user to make his selection more convenient.
Can I do this? If so, how?
 
You may have chosen an inappropriate control for this purpose. If you can only use bound controls look into a Datagrid or Flexgrid. Otherwise you could use a Listview
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
I think what u need to do is make the data appear in the select staement u use to retrieve the data.

i.e

SELECT Forename + ' ' + Surname + ' (' + Deptartment + ')' as Employee FROM EmployeeFile ORDER BY Employee

This would do someting like "Mark Taylor (IT)" by listing the EMployee as your Listfield.

Not sure on the SQL but that is the general idea i believe.

Mark Mark Taylor
Technical Manager
NHS
 
Yes, DataGrid was pretty much pre-configured to do what I
needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top