Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 16-Sep-12 11:02am
besthms767
Comments
Christian Graus at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
' 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")
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 545
1 OriginalGriff 285
2 Shweta N Mishra 244
3 Mathew Soji 225
4 BillWoodruff 200
0 OriginalGriff 6,153
1 Sergey Alexandrovich Kryukov 5,758
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,735


Advertise | Privacy | Mobile
Web03 | 2.8.1411019.1 | Last Updated 26 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100