If e.DataCol.Name = "diqu" Then Dim dr As DataRow dr = e.DataTable.Find("cgddiqu = '" & e.NewValue & "'") If dr IsNot Nothing Then MessageBox.Show("地区已经存在!")
e.Cancel = true End IfEnd If