I have a datagridview that i want to capture two of the columns and use in a calculation. When the datagridview is populated it has 4 columns. I want to
capture the contents of the 3rd and 4th columns.
When I try, I get errors. I seriously need help. Below is a copy of the code:
Dim R As Integer
Dim total As Decimal
For R = 0 To Details1.Tables(0).Rows.Count - 1
total = total + CDec(DataGrid.Item(R, 2)) * CDec(DataGrid.Item(R, 3))
txtTotal.Text = total.ToString("$##.00")