Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim ds As DataSet = Me.DsBrio250Table5
where "Me" is the datagrid
Dim rowCount As Integer = ds.Tables(0).Rows.Count()
Dim col As Integer = 4
Dim row As Integer
Dim dsum As Double
For row = 0 To rowCount - 1
If IsNumeric(Me.Item(row, col)) Then
dsum = dsum + CLng(IIf(IsDBNull(Me.Item(row, col)), "0", Me.Item(row, col)))
End If
Next row
End Sub