做个逻辑列【展开】,勾选就生成
If e.DataCol.Name = "展开" Then For i As Integer = 1 To e.DataRow("数量") Dim ndr As DataRow = DataTables("工艺单").AddNew ndr("某列") = e.DataRow("某列") ndr("某列") = e.DataRow("某列") Next End If