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.
 

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top