加一个最外层判断 IF
e.Datarow.IsNULl("分数") then Select Case e.DataCol.Name
Case “分数"
IF e.Datarow.IsNULl("分数") then
e.datarow("等级")=""
else
Dim v As Double = e.Datarow("分数")
if v < 60 Then
e.datarow("等级") = “E”
Elseif v < 70 Then
e.datarow("等级") = "D”
Elseif v < 80 Then
e.datarow("等级") = "C”
Elseif v < 90 Then
e.datarow("等级") = "B”
Else
e.datarow("等级") = "A”
End If
end if
End Select
[此贴子已经被作者于2013-5-20 10:16:31编辑过]