【发布时间】:2018-12-30 14:51:47
【问题描述】:
我已将数据放入数据网格视图列
dgvAccDetail.Rows(i).Cells(3).Value = dtVD.Rows(i).Item("DEBIT").ToString.Trim
现在我需要得到 "DEBIT" 列的总和,为此...
Dim tot As Integer = 0
For i As Integer = 0 To dgvAccDetail.RowCount - 1
tot += dgvAccDetail.Rows(i).Cells(4).Value
Next
If tot = 0 Then
MessageBox.Show("No Records Found")
End If
TXTVoucherDTotal.Text = tot.ToString()
但我收到了消息
“从字符串到双精度类型的转换无效”
请告诉我这段代码有什么问题,
【问题讨论】:
-
你的数据源是什么?是数据表吗?
标签: string vb.net types datagridview double