Select Case e.DataCol.Name
Case "工序及单价"
If e.NewValue Is Nothing Then '如果新值是空白,也就是品名列的内容为空
e.DataRow("合计单价") = Nothing '那么清空此行单价列的内容
Else
Dim mc = System.Text.RegularExpressions.Regex.Matches(e.NewValue , "[0-9\.]+")
Dim sum As Double = 0
For i As Integer = 0 To mc.count-1
output.show(mc(i).value)
sum += val(mc(i).value)
Next
e.DataRow("合计单价") = sum
End If
End Select