销售总表的DataColChanged事件
If e.DataCol.Name = "日期" Then
Dim pdr As DataRow = e.DataRow.GetParentRow("查询")
Dim fdr As DataRow = e.DataTable.Find("关联列 = '" & e.DataRow("关联列") & "'", "_Sortkey")
If pdr IsNot Nothing Then
If fdr IsNot Nothing Then
pdr("日期") = fdr("日期")
Else
pdr("日期") = Nothing
End If
End If
End If