1 Replies - 223 Views - Last Post: 24 June 2012 - 04:27 AM Rate Topic: -----

#1 KasunL  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 11-April 11

Adding an image to gridview control cell

Posted 23 June 2012 - 08:10 PM

Hi all!

i have directory path to image files stored in an access database. i want to retrieve the images that the paths are pointing to an add them to the cells of a DataGrid control i have on my form. could anyone point out the way to do that? Appreciate a little code example. Thanks for any input.

Thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: Adding an image to gridview control cell

#2 sela007  Icon User is offline

  • D.I.C Addict

Reputation: 137
  • View blog
  • Posts: 829
  • Joined: 21-December 11

Re: Adding an image to gridview control cell

Posted 24 June 2012 - 04:27 AM

If you know the path of the image then it's simple.
Bitmap bmp = new Bitmap("c:\\image.jpg");
dg1.Rows[x].Cells[x].Value = bmp;

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1