If e.DataCol.Name = "产品" AndAlso e.newValue IsNot Nothing Then
Dim Filter As String = "[_SortKey] > " & e.DataRow("_SortKey") & " And [产品] = '" & e.newValue & "'"
Dim dr As DataRow = e.DataTable.Find(filter,"[_sortkey] desc")
If dr IsNot Nothing Then
dr("入库") = e.DataRow("库存")
End If
End If
这段代码只是判断产品,入库列的改变不会触发