Sub TestCal()
'Dim chk As DataGridViewCheckBoxCell = DirectCast(row.Cells(8), DataGridViewCheckBoxCell)
Dim i As Integer = 0
Dim chk As New CheckBox '= grdShowItem.Rows(i).Cells(8)
Try
Dim sumSec As Double
For Each r As DataGridViewRow In Me.grdShowItem.Rows
' If grdShowItem.Rows(i).Cells(8).Value IsNot Nothing Then
If CBool(grdShowItem.Rows(i).Cells(8).Value) = True Then
'If chk.Checked = True Then
sumSec = r.Cells(2).Value * 3
r.Cells(3).Value = sumSec
End If
Next
Catch exsql As SqlException
MsgBox(exsql.Message, MsgBoxStyle.Exclamation)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation)
End Try
End Sub