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!

SHOWING MORE THEN 1 COLUMN IN A LISTBOX 1

Status
Not open for further replies.

daveonion

Programmer
Aug 21, 2002
359
GB
Hi I am wondering how do you show more then 1 column.

I currently have a List box populated by a dataview and I want 5 columns from the dataview to be shown in the listbox but am unsure how to do it.

any help would be appreciated
 
If you want multiple columns, I would recommend you use a lsitview - with this you can better define your columns and hence presentation to the end user
 
Hi

I had a look at listview but noticed there is no datasource option, how do you populate it?

Thanks
 
OPTION 1) USE A LISTVIEW

OPTION 2) OVERRIDE THE BASE CLASS PAINT EVENT A DRAW A SECOND COLUMN

SUGGESTION 1) USE A LIST VIEW

SUGGESTION 2) STOP TYPING IN CAPS. IT'S FREAKING ANNOYING!

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Hi thanks for your help bruce2402 and Sweep,

I've finally got my listview populated with the data I need, the only issue I have now is selecting a specific row, it seems that I can only select rows in the first column, so when I click on any of the other columns the row doesnt highlight, any reasons why this is so? And how to get around it,

thanks
 
Aha, try setting the listview property -

FullRowSelect = true

and/or

MultiSelect = true
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top