datacolchanged事件
If e.DataCol.Name = "列名" Then
DataTables("子表").DeleteFor("合同单号 = '" & e.DataRow("合同单号") & "'") For i As Integer = 1 To e.DataRow("列名") Dim ndr As DataRow = DataTables("子表").addNew() ndr("合同单号") = e.datarow("合同单号") Next End If