在子表的DataColChanged事件写入:
if e.col.name = "物料编号" then
dim pr as datarow = e.datarow.getparent(”父表“)
if pr isnot nothing then
pr(”料号数量“) = DataTables("子表").GetValues("物料编号","关联列='" & e.dataRow("关联列") & "'").Count
end if
在子表的DatarowDeleting事件写入:
e.datarow("物料编号") = ""
建议看看:
http://www.foxtable.com/help/topics/2649.htm