Multiple Columns in a ListBox

Hi All,

I want to know if there is any way of making a list box with more then one column .... I'm terrified of the DataGrid :) so I'd like to use the ListBox if possible ...

Txs
Peter
Pete2003Asked:
Who is Participating?
 
Fahad MukhtarConnect With a Mentor Distinguished EngineerCommented:
You can use LISTVIEW control
if you are still intersted in Multiple Columns in a ListBox check:
http://www.codeproject.com/cs/combobox/multicolumnlistbox.asp
0
 
Pete2003Author Commented:
Ok that's someones personal implementation , but I want to know if the standard ListBox can do multiple columns ...

0
 
Fahad MukhtarDistinguished EngineerCommented:
nO.. you can acheive it through string concatination but thats limiited..
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Pete2003Author Commented:
That's what I've done right now .. I just pad the strings to the max len and get a visible column but ofcourse without column functionality ...

0
 
ErikPhilipsCommented:
If you want column functionality, ListView is the way to go.  What are you trying to accomplish that might prevent you from using a ListView?
0
 
Pete2003Author Commented:
I'm doing web forms and from what I understand you can only use it on normal windows
0
 
TheAvengerCommented:
No make to make list box with more than one column in web forms. If you need it read only, you can make a table or something to show the data in it. Otherwise you will need a bunch of controls, like a table with check boxes in one column, so that records can be selected, or something similar.
0
 
Fahad MukhtarDistinguished EngineerCommented:
yeah html table is a better alternative on the web for datagrid. But datagrids are much more flexible and powerful than those..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.