My first post. Hello everyone
I have a DataGridView, and a DataTable. The first column in the DataTable is the name of an image (just a simple string). The second column is a description (also just a string). What I want to do is display the images in the first column.
I have code that works for a PictureBox (below):
How can I make this work for the grid? I tried different variations with the image column to no avail, and it's beginning to drive me bonkers
Help is appreciated. Thanks
I have a DataGridView, and a DataTable. The first column in the DataTable is the name of an image (just a simple string). The second column is a description (also just a string). What I want to do is display the images in the first column.
I have code that works for a PictureBox (below):
VB.NET:
Dim ib As New PictureBox()
Dim MyWebClient As New System.Net.WebClient
Dim ImageInBytes() As Byte = MyWebClient.DownloadData("http://www.someurl/images/" & dr.Item(0))
Dim ImageStream As New IO.MemoryStream(ImageInBytes)
ib.Image = New System.Drawing.Bitmap(ImageStream)
ib.SizeMode = PictureBoxSizeMode.StretchImage
ib.Size = New System.Drawing.Size(200, 100)
How can I make this work for the grid? I tried different variations with the image column to no avail, and it's beginning to drive me bonkers
Help is appreciated. Thanks
Last edited by a moderator: