是否可以在仅包含数字的datagridview中获得最大值?
这是代码。它获取所有值。
Dim Max As Integer = 0
For Each rws As DataGridViewRow In dgvItems.Rows
If Max < rws.Cells(1).Value Then Max = rws.Cells(1).Value
Next
试试这个,
If IsNumeric(rws.Cells(1).Value) Then
If Max < rws.Cells(1).Value Then Max = rws.Cells(1).Value
End If
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句