how to put data into a listview?

WestSideRailways

New member
Joined
Nov 25, 2013
Messages
2
Programming Experience
1-3
Hi There,

i am a novice programmer and am looking for some help. :)

have been looking around to try to put data into a listviewbox on my form.

my listviews box has 2 columns and 7 rows.

by using this ->> Listview1.items.add("some text") this goes into the fifth rows in the first column. I have no idea why.?

now trying to get something into the 2nd. column ->> listviewitem.subitems.add(textbox1.text) nothing shows

would like some help on this.

Thanks to all that reply. :)
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,723
Location
Sydney, Australia
Programming Experience
10+
If you want columns then you have to set the View to Details and actually add columns. As for rows, the ListView only has rows if you add items. Each item is a row. If you're seeing a new item appear on the fifth row then you had exactly four items before that.

Perhaps you should show us all the relevant code as it appears in your project, rather than just tiny snippets out of context.
 

WestSideRailways

New member
Joined
Nov 25, 2013
Messages
2
Programming Experience
1-3
I do apologize for that, have been reading all over the internet, on how to do this.
found out why it was going to the fifth line was the first were blank, as soon as i cleared the listview, everything started from the first line. :)

will post more on Friday, just online to check my email...then goto bed.

Rdgs.

To ALL
 
Top Bottom