Hello to all.
Today my sample is all above listview. Populate listview of data from database.
If you have ur connectionstring and recordset. Then set 1 listview and 1 commandbutton.
In your command button insert this code:
Dim Item as ListItem 'variable for your subitems
ListView1.ListItems.Clear 'Clear your Listview before loading a new data
While Not rs.eof
Set Item = ListView1.ListItems.Add(,,rs!One)
Item.Subitems(1) = rs!Two
rs.movenext
Wend
Hope this one will help you
Subscribe to:
Post Comments (Atom)
2 comments:
While Not rs.eof
ListView1.ListItems.Add(,,rs!One)
ListView1.ListItems(ListView1.ListItems.count).IistSubitems.add (,, rs!Two)
rs.movenext
Wend
Populate listview with data
Post a Comment