Update Image Column Using Datagridview

I'm using datagridview control with image column. In my program, I used an open dialog box control to give the user to choose an Icon and after choosing the selected Icon. It should display in datagridview image column and confirm before saving in database. Hoping somebody can help me.

Thanks in advance


Answer this question

Update Image Column Using Datagridview

  • VS228

    If your DataGridView is bound to a datasource, insert the image into the correct place in your datasource. If the DataGridView is not databound, try dgv.Rows[currentRow].Cells[1].Value = userImage;

  • Patrick Bristow


    my question is how to put the icon image to a specific column in my datagridview control

    example:
    column 1 is a textbox column
    column 2 is an image column
    column 3 is a button

    in my data entry windows forms using datagridview, the user will enter in the textbox column and in the second column which an image column. The user will choose an icon image using open dialog control and after choosing the desired icon from dialog box, the icon image will display in column 2 which the image column. Then, user will click the button column 3 as a confirmation to save the information entered in that particular row.

  • very saggy

    Give it a try, and post any specific questions or problems you have.

  • sabreman

    thanks dude!!!, got it
  • Update Image Column Using Datagridview