title: Check each row of datagridview and get value of column(s)
body: <p>I have a datagridview that is populated with a couple of rows. I not sure where to start to loop the grid from row 1 to the last row and check some values on two of the columns. My grid looks like this, I need to check the values of r1:c1 and r1:c4 using a loop. my c1 is checkbox column by the way.</p>
  
  <pre><code>   c1  c2  c3  c4  c5
  r1 true    4    5   5   5            
  r2 false   4    5   5   5
  r3 false   8    6   4   5
  r4 false   5    1   2   3
  r5 false   4    1   2   1 
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>For Each row As DataGridViewRow In datagrid.Rows
          If row.Cells("column1").Value = True Then
              Dim getValue As String
              getValue = row.Cells("column4").Value
              msgbox(getValue)
          End If
  Next
  </code></pre>
  
  <p>Problm is, if any cell in column 1 is true, getValue is still getting set the value in column4. I only want the column4 value if column 1 row is true.</p>