去编写 BeforeSaveDataRow 事件。
Dim nms() As String = {"客户全称","客户","地址","联系电话","联系人","联系人手机","付款天数","客户英文简称"} '不允许为空的列名For Each nm As String In nms If e.DataRow.isnull(nm) Then messagebox.show(nm & "必须输入内容") e.Cancel = True Exit For End IfNext