Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / March 2007

Tip: Looking for answers? Try searching our database.

how to show multiple fields in a listbox?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arvid - 13 Mar 2007 17:08 GMT
I have a listbox that is filled with data from a database, but only one field
shows.
Is it possible to show more fields in a listbox?


regards,

Arvid
Mark Fitzpatrick - 14 Mar 2007 03:29 GMT
Yes, set the Rows property to determine the number of rows/items to show in
the list.

Signature

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

>I have a listbox that is filled with data from a database, but only one
>field
[quoted text clipped - 4 lines]
>
> Arvid
Arvid - 16 Mar 2007 09:41 GMT
I have multiple rows, but just one item per row. I would like to see in one
row/record a name and a address and ... But I have to choose one of them.

Can I show all?

Signature

regards,

Arvid

> Yes, set the Rows property to determine the number of rows/items to show in
> the list.
[quoted text clipped - 7 lines]
> >
> > Arvid
intrader - 14 Mar 2007 19:11 GMT
> I have a listbox that is filled with data from a database, but only one field
> shows.
[quoted text clipped - 4 lines]
>
> Arvid
Perhaps you can use the template capability of the listbox. You can then
put any html you need there.
Riki - 18 Mar 2007 18:31 GMT
> I have a listbox that is filled with data from a database, but only
> one field shows.
[quoted text clipped - 3 lines]
>
> Arvid

Use SQL to combine the fields that you want:
SELECT field1 + '-' + field2 AS myField FROM myTable;

Signature

Riki

Arvid - 19 Mar 2007 10:58 GMT
I changed my view like you said (but oracle syntax ) , it seems to be a quick
and easy way to solve my problem

thank you

Signature

regards,

Arvid

> > I have a listbox that is filled with data from a database, but only
> > one field shows.
[quoted text clipped - 6 lines]
> Use SQL to combine the fields that you want:
> SELECT field1 + '-' + field2 AS myField FROM myTable;

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.