VB.Net - DataGridView - Image

  • Thread starter Thread starter pc209
  • Start date Start date
P

pc209

Guest
Hello, Im beginner for VB.Net, I put several image file paths in Access database column,

(Database has few column ID, Name, FilePath)

I want to show all the data in DataGridview with Image (Not file path)

Its like,

ID, Name and Image-----------> 1st row details

ID, Name and Image-----------> 2nd row details

I read some articles, but I really not understand how to do this, from its I can load single image in to DataGrid its like this,

Dim NewImage As New DataGridViewImageColumn()
Dim Pics As Image = Image.FromFile("C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg")
NewImage.Image = Pics
DataGridView1.Columns.Add(NewImage)
NewImage.HeaderText = "Photo"
DataGridView1.DataSource = ds.Tables(0)

but I need another thing to do, Please help somebody to do this.

Continue reading...
 
Back
Top