"比率"列为Double数据类型
If e.DataCol.Name = "比率" Then 'Dim dr As DataRowdr = e.DataTable.Find("货品编号 = '" & e.DataRow("货品编号") & "' And 比率 = " & e.NewValue )If dr IsNot Nothing Then MessageBox.Show("比率不能重复!") e.Cancel = TrueEnd IfEnd If
删除"比率"列的数值时会出错,请帮忙修改,谢谢!