locked
how to load Image "Default" if the image not found RRS feed

  • Question

  •  

    I have column in  the table of Import but sometimes not insert Image

    and i have DataGridView to show image int column image

    but if not found image he write this message to me

    http://www8.0zz0.com/2010/03/29/05/673586742.png

    • Edited by Martin_Xie Monday, April 5, 2010 3:20 AM Modify HTML View code to display an illustration on your post.
    Monday, March 29, 2010 5:40 AM

Answers

  • Hello,

    Where is the datasource of your datagridview?

    And how did you load your image into your datagridview column? and where is the images,  they are in database or in your hard disk?

    Thanks

    Chao

    • Marked as answer by KhaLeeL ZoURoB Saturday, January 24, 2015 10:26 AM
    Wednesday, March 31, 2010 9:36 AM

All replies

  • Then there is something wrong in the code which sets the image, while that can be in endless ways, can you show that code?
    Success
    Cor
    Monday, March 29, 2010 6:38 AM
  •   Me.ClmPicture.DataPropertyName = "Picture"
            Me.ClmPicture.HeaderText = "Picture"
            Me.ClmPicture.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch
            Me.ClmPicture.Name = "ClmPicture"
            Me.ClmPicture.ReadOnly = True
    Monday, March 29, 2010 8:47 PM
  • Hello,

    Where is the datasource of your datagridview?

    And how did you load your image into your datagridview column? and where is the images,  they are in database or in your hard disk?

    Thanks

    Chao

    • Marked as answer by KhaLeeL ZoURoB Saturday, January 24, 2015 10:26 AM
    Wednesday, March 31, 2010 9:36 AM
  • Probably something goes wrong in the binding, you can catch that using the currency (databinding) events

     

    http://www.vb-tips.com/DataBindingEvents.aspx


    Success
    Cor
    Wednesday, March 31, 2010 11:02 AM