DataGridView Image

Posted on 2008-11-04
Last Modified: 2012-06-27
I have a DataGridView that has the following code on load

DataGridView1.Item(0, 0).Value = Image.FromFile(DataGridView1.Item(4, 0).Value)

How can I apply this code to all of the rows in the DataGridView instead of the first row as well as account for a null value in the 4th column??
Question by:H-SC
    LVL 7

    Accepted Solution

    Why dont you just do a Loop
    somethn like

    For rowIndex as Integer = 0 to DataGridview1.Rowcount - 1
        'do whatever Here
    LVL 1

    Author Comment


    how can I incorporate that into what I have with the following

    DataGridView1.Item(0, 0).Value = Image.FromFile(DataGridView1.Item(4, 0).Value)
    LVL 1

    Author Comment


    any ideas on this one...?

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now