首页 > 解决方案 > 如何在 vb.net 中获取 DataGridView 中的列总数

问题描述

我使用了下面的代码,它对结果进行了四舍五入

Dim iTax As Double

If VacationsDataGridView.RowCount > 1 Then
    For index As Double = 0 To VacationsDataGridView.RowCount - 1
        iTax += Convert.ToDouble(VacationsDataGridView.Rows(index).Cells(3).Value)
    Next

    Label4.Text = iTax
End If

我不知道这是什么错误!

标签: vb.net

解决方案


推荐阅读