Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 469
  • Last Modified:

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??
0
H-SC
Asked:
H-SC
  • 2
1 Solution
 
the_bachelorCommented:
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now