DataGridView Image

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??
LVL 1
H-SCAsked:
Who is Participating?
 
the_bachelorConnect With a Mentor Commented:
Why dont you just do a Loop
somethn like

For rowIndex as Integer = 0 to DataGridview1.Rowcount - 1
    'do whatever Here
Next
0
 
H-SCAuthor Commented:
the_bachelor,

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

DataGridView1.Item(0, 0).Value = Image.FromFile(DataGridView1.Item(4, 0).Value)
0
 
H-SCAuthor Commented:
the_bachelor,

any ideas on this one...?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.