不太理解,如果是子表同步增加20行的话,你可以在父表的DatacolChanged事件加上下面的代码试试:
if e.datacol.name = "编号" then
if e.NewValue > "" then
dim cnt as integer = e.datarow.GetChildRows("子表")
for i as integer = cnt +1 to 20
dim dr as datarow = datatables("子表").AddNew()
dr("编号") = e.datarow("编号")
next
end if