Select Case e.DataCol.Name Case "关联列名称","逻辑列" If e.DataRow.IsNull("关联列名称") = False AndAlso e.DataRow("逻辑列") = True Then If e.DataRow.GetChildRows("子表").Count = 0 Then Dim dr As DataRow = DataTables("子表").AddNew() dr("关联列名称") = e.DataRow("关联列名称") End If End If End Select