把代码写到 补偿表 的 datacolchanged事件里
If e.DataCol.Name = "补偿项目" Then
Dim pdr As DataRow = e.DataRow.GetParentRow("被拆*迁人") '自己改一下,被屏蔽了
If pdr IsNot Nothing Then
Dim fdr As DataRow = DataTables("装修标准").find("名称 = '" & e.NewValue & "' and xmid = '" & pdr("xmid") & "'")
If fdr IsNot Nothing Then
e.DataRow("重置单价") = fdr("单价")
e.DataRow("计量单位") = fdr("单位")
End If
End If
End If
[此贴子已经被作者于2013-12-10 19:18:31编辑过]