If e.DataCol.Name = "身份证号" Then Dim dr As DataRow dr = e.DataTable.Find("身份证号 = '" & e.NewValue & "'") If dr IsNot Nothing Then MessageBox.Show("此身份证号已经存在!")
e.Cancel = True End IfEnd If