-- 作者:有点甜
-- 发布时间:2017/8/20 14:22:00
--
子表DataColChanged事件
If e.DataCol.Name = "产品" orelse e.datacol.name = "数量" Then Dim pr As DataRow = e.DataRow.GetParentRow("订单") If pr IsNot Nothing Then Dim str As String = "" For Each dr As DataRow In pr.GetChildRows(e.DataTable.name) str &= dr("产品") & "*" & dr("数量") & "," Next pr("产品") = str.trim(",") End If End If
|