Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a datatable called "dt" with only one column containing names of subjects. i want to populate a list view with the datatable. I have filled listview with datareaders in the past but this time i want to use the datatable. please help.
Posted

VB
Dim list As New ImageList()
list.ImageSize = New Size(64, 64)
Dim i As Image = Bitmap.FromFile("product.png")
list.Images.Add(i)
listView1.LargeImageList = list
listView1.Items.Add("Java", 0)

Add Last line in For Each loop
 
Share this answer
 
*sigh* ... a search engine (e.g. Google) can really be your best friend!

Try one of these links[^]

Or, quite simply
DataGridView1.DataSource = dt
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900