Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am working on VB.Net Windows Application

I have a datagridview with two column. 1- Text and 2- Image.
I have add a image "someimage.png" in resources and same in imagelist.

when i add new items at runtime to datagridview the image dows not show.

VB
'adding the image with imagelist
dgv.AddItem("sometext", ImageList1.Images(0))


VB
'adding the image with resources
dgv.AddItem("sometext", My.Resources.sometext)


i have also try
VB
Dim _image As New Bitmap(DirectCast(My.Resources.ResourceManager.GetObject("sometext"), System.Drawing.Bitmap))

dgv.AddItem("sometext", _image)


none of above are working..
please help
Posted
Updated 4-Oct-11 18:58pm
v2

See this[^]. It may help you.
 
Share this answer
 
Comments
kals84 5-Oct-11 2:04am    
thanks but i don't want to use Image.FromFile("Image Path")
And you sure about this[^] ??

-KR
 
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