比如:
http://www.foxtable.com/webhelp/topics/1454.htm
父表的DataColChanged事件 中设置如下代码:
If e.DataCol.Name = "工序" orelse e.DataCol.Name = "损失类型" Then
dim sb as new stringbuilder
dim drs as list(of datarow) = DataTables("子表").select("工序='" & e.DataRow("工序") & "' and 异常类型='" & e.DataRow("损失类型") & "'")
for i as integer = 0 to drs.count - 1
sb.appendline((i+1) & "," & drs(i)("故障"))
next
e.DataRow("数量") = sb.tostring
End If