Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. DataGridViewImageCell

DataGridViewImageCell

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rajesh Rajan Pankapattu
    wrote on last edited by
    #1

    How could I get the file name or path of an image file displayed in a DataGridViewImageCell by clicking on the Cell...?

    H D 2 Replies Last reply
    0
    • R Rajesh Rajan Pankapattu

      How could I get the file name or path of an image file displayed in a DataGridViewImageCell by clicking on the Cell...?

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      I am slightly confused by your question. If you put the image into the DataGridView, then surely you know the path/filename. If the image came from a database then it does not have a path.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec. Business Myths of the Geek #4 'What you think matters.'

      1 Reply Last reply
      0
      • R Rajesh Rajan Pankapattu

        How could I get the file name or path of an image file displayed in a DataGridViewImageCell by clicking on the Cell...?

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        If the image came from a database, either you database stored the path and you haven't retrieved it, or it stored the image itself, in which case, there is no path since it's not stored as a file anywhere. If you built the dataset yourself from image files, you just need to add the path to the file you used to another column in the dataset.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups