If e.DataCol.name = "物品名称" Then If e.DataRow.IsNull("物品名称") Then e.DataRow("规格") = Nothing e.DataRow("单位") = Nothing '其他列加在这里 Else Dim dr As DataRow = DataTables("库存").Find("物品名称 = '" & e.DataRow("物品名称") & "'") If dr IsNot Nothing e.DataRow("规格") = dr("规格") e.DataRow("单位") = dr("单位") '其他列加在这里 End If End If End If