这个简单,设置在DataColChanged事件中:
if e.DataCol.Name = "产品" And e.NewValue > ""Then
if DataTables("库存").Find("产品 = '" & E.NewValue & "'") is Nothing Then
Dim dr As DataRow = DataTables("库存").AddNew()
dr("产品") = e.NewValue
End if