DataColChanged事件
msgbox(1)
If e.DataRow.RowState = DataRowState.Added Then
msgbox(e.datacol.name)
If e.DataCol.Name ="机台号码" Then
Dim dr As DataRow = DataTables("注塑日报").find("机台号码 = '" & e.DataRow("机台号码") & "' and _Identify <> " & e.datarow("_Identify"),"生产日期 DESC,_identify desc" )
msgbox(2)
If dr IsNot Nothing'如果找到,则设置各列内容
msgbox(3)
e.DataRow("接班模数")= dr("交班模数")
e.DataRow("交班结存")= dr("本班结存")
End If
End If
End If