版主,请指导一下,我用以下两个代码,在customsinvoice表属性中都试了,可还是有点问题。
另外一个汇总表中的 Netweight_total 只有当totalprice发生变化时,netweight_total汇总才会更新,我是让netweight_total列发生变化时,netweight_total汇总就会更新,当然汇总表中totalprice 当totalprice 变更时会同步更新。
以下哪儿错了吗?感谢。
If e.DataCol.Name = "ShippingNo" OrElse e.DataCol.Name = "Totalprice" OrElse e.DataCol.Name = "Netweight_total" Then
Dim pr As DataRow
pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
If pr IsNot Nothing Then
DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
End If
End If
或者改这样:
If e.DataCol.Name = "ShippingNo" OrElse e.DataCol.Name = "Totalprice" OrElse e.DataCol.Name = "Netweight_total" Then
Dim pr As DataRow
pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
If pr IsNot Nothing Then
DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
End If
End If
If e.DataCol.Name = "ShippingNo" OrElse e.DataCol.Name = "Netweight_total" Then
Dim pr As DataRow
pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
If pr IsNot Nothing Then
DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
End If
End If