如下这段代码不起作用:
If e.DataCol.Name = "吋长" Then
If e.DataRow("直弯") = ""
If e.NewValue IsNot Nothing
MessageBox.Show("直弯一栏必须填写<直身/弯头/珠直/珠弯>字样!", "提示")
e.Cancel = True
End If
End If
End If
但下面的代码是有效的:
If e.DataCol.Name = "确认" Then
If e.DataRow("直弯") = ""
If e.NewValue = True
MessageBox.Show("直弯一栏必须填写<直身/弯头/珠直/珠弯>字样!", "提示")
e.Cancel = True
End If
End If
End If
这是为什么?(备注:吋长为单精度小数型,直弯为字符型,确认为逻辑型)。谢谢。