老师:
If e.DataCol.Name = "产品编号"
Then
If e.NewValue Is Nothing
Then
e.DataRow("品名") = Nothing
e.DataRow("型号") = Nothing
e.DataRow("规格") =
Nothing
e.DataRow("单价") = Nothing
e.DataRow("日期") = Nothing
Else
Dim dr As
DataRow
dr = DataTables("产品").Find("[产品编号] = '" & e.NewValue & "'")
If dr IsNot
Nothing
e.DataRow("品名") = dr("品名")
e.DataRow("型号") = dr("型号")
e.DataRow("规格") = dr("规格")
e.DataRow("单价") = dr("单价")
e.DataRow("日期") = dr("日期")
End
If
End
If
End
If
Select
Case e.DataCol.Name
Case
"品名","型号","规格","单价","日期"
Dim Filter As
String = "[产品编号] =
'" & e.DataRow("产品编号") & "'"
Dim drs As
List(Of DataRow) =
DataTables("订单").Select(Filter)
For
Each dr As
DataRow
In drs
dr(e.DataCol.Name) = e.NewValue
Next
End
Select
上面的代码执行后,"品名","型号","规格","单价"都能更新,唯有"日期"列没有反映,是何原因?