Image not displaying in datagridview column in vb.net

Joined
Dec 8, 2019
Messages
1
Reaction score
0
I have the following code that I want to use to display an image in a DataGridView cell:

dgvInventory.Item(7, i).Value = My.Resources.ResourceManager.GetObject("picture")

But instead of displaying the required image, it writes System.Drawing.Bitmap in the cell in the cell.

Please note that the DataGridView table was created at run time, so I know I am supposed to change the column property to be an DataGridViewImageColumn but I just could not figure out how to.

Thanks in advance

Please I really need help with this.
 
Well first I need to know if this is a desktop app or a web app? If it's a web app, the right way to display an image is to use the IMG tag and set the SRC attribute to the URL of the image. If it's a desktop app you will probably have to add the right control to the column and then set the IMAGE attribute to the file location.
 
Back
Top