在表的BeforeAddDataRow事件设如下代码,
If e.DataRow.IsNull("项目名称") Or e.DataRow.IsNull("县") Or e.DataRow.IsNull("单位名称") Then '判断是否不符合验证要求
e.Cancel = True '那么取消输入并提示用户
Messagebox.Show("项目名称,县区,单位未输入完整内容,不能增加新行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
提示如下错误:
.NET Framework 版本:2.0.50727.8831
Foxtable 版本:2017.12.18.1
错误所在事件:S记录杆管,BeforeAddDataRow
详细错误信息:
未将对象引用设置到对象的实例。