Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
下载信息 [文件大小: 下载次数: ] | |
![]() |
取消正在输入的一个就行了:
e.Cancel = True
If e.DataCol.Name = "地区编号" Then
Dim dr As DataRow
dr = e.DataTable.Find("地区编号 = '" & e.NewValue & "'")
If dr IsNot Nothing Then
MessageBox.Show("该地区名称已经存在,不能再次增加地区名称的地区!")
e.DataRow("国家")= Nothing
e.DataRow("省") = Nothing
e.Newvalue = Nothing
End If
End If
If e.DataCol.Name = "地区编号" Then
Dim dr As DataRow
dr = e.DataTable.Find("地区编号 = '" & e.NewValue & "'")
If dr IsNot Nothing Then
MessageBox.Show("该地区名称已经存在,不能再次增加地区名称的地区!")
e.DataRow("国家")= Nothing
e.DataRow("省") = Nothing
e.Newvalue = Nothing
End If
End If
datacolchanged还是有提示。
行不通的。