表属性设置掩码后,提示重复了,怎么办?
掩码设置:>LL0000-09
重复值的代码如下:
If e.DataCol.Name = "管理号码" Then
If e.DataRow("分批") = False
Dim dr As DataRow
dr = e.DataTable.Find("管理号码 = '" & e.NewValue & "'")
If dr IsNot Nothing Then
MessageBox.Show("此管理号码已经存在!")
e.Cancel = True
End If
e.DataRow("管理号码") = Nothing
End If
End If
解决办法DataColChanging和DataColChanged的区别
[此贴子已经被作者于2017/8/13 1:59:20编辑过]