'DataColChanged事件 Select Case e.DataCol.Name Case "订单号","品种" Dim dr As DataRow = e.DataRow If e.DataTable.GetUniqueValues("[订单号] = '" & dr("订单号") & "'","品种").Count > 1 Then Dim drs As List(Of DataRow) = e.DataTable.Select("[订单号] = '" & dr("订单号") & "'") For Each r As DataRow In drs r("类型") = "拼柜" Next Else dr("类型") = "整柜" End If End Select