Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dears,
Please help me to fill a Gridview in VB.net windows application , to fill it row by row , Filling by a Dataset which is connected to a database will not work with me , because I have many images files paths , and no need to store it in a database , I have three column , 2 of them are text , and one of them is picture box , so I have to fill the path of the image in that picture box , Please help ,
I appreciate your response
Posted
Comments
Christian Graus 16-Sep-12 20:34pm    
I am struggling to see a question here. If you have images in your file system, then you can make your picture box point to them. What is the issue ?

1 solution

First Set the Column Type of Image Column of Your DataGridView Control to "Image" Using Edit Column Dialog of Visual Studio. After that It Display Images when you set Image as it's Value
VB
' For Instance I've Use Column1 (Array Index 0) to Display Images.
Me.DataGridView1.Rows(0).Cells(0).Value = System.Drawing.Image.FromFile _
("C:\Images\Image1.jpg")
 
Share this answer
 
v2

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