你好, 这个代码在表属性中的Datacolchanging中, 一下运就会出现死循环了,哪儿出错了,请给看一下,麻烦了。
If e.DataCol.Name = "FPrioritized" Then
Dim dr As DataRow
dr = e.DataTable.Find("FPrioritized = '" & e.NewValue & "'")
If dr IsNot Nothing Then
If MessageBox.Show("已经重复了,是否要重新修改 ?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes Then
e.DataRow("FPrioritized") = True
dr("FPrioritized") = False
dr("FNeg") = True
e.Cancel = True
End If
e.DataRow("FPrioritized") = False
dr("FNeg") = True
End If
End If