title: Multiplying column values in datagridview
body: <p>I am currently making a payroll system and I am trying to make calculations between columns. I am trying to multiply a constant value to the values in a column named <strong>PayRate</strong></p>
  
  <p>I currently have two forms. the first form is where I tick off all necessary deductions and earnings. when this is accomplished, a button will be clicked and a second form containing the datagridview with the employee details and pay rate will be shown.</p>
  
  <p>here is my code:</p>
  
  <pre><code>    Private Sub btnPayroll_Click(sender As Object, e As EventArgs) Handles btnPayroll.Click
      myConnection.ConnectionString = "Provider = Microsoft.ACE.OLEDB.12.0;   Data Source = C:\Users\MatMat\Documents\PBIPayrollMgmt1.accdb;"
      myConnection.Open()
  
      datagridshow()
  
      Me.Hide()
      viewPayroll.Show()
  
      If CheckBox1.Checked Then
          Try
              Dim icell As Double
              Dim totalpay As Double
  
              icell = viewPayroll.DataGridView1.CurrentRow.Cells(5).Value
  
              totalpay = icell * 11.0
  
              viewPayroll.DataGridView1.CurrentRow.Cells(5).Value = totalpay
  
  
          Catch ex As Exception
              MessageBox.Show(ex.ToString)
          End Try
      End If
  
  End Sub
  </code></pre>
  
  <p>what it does what i need to but it only multiplies the value in the first row. How do I apply it to all rows? Is there such a thing as "CurrentColumn"?</p>
  
  <p>Picture below for reference:</p>
  
  <p><a href="https://i.stack.imgur.com/ConVy.png" rel="nofollow noreferrer">2nd Form</a></p>