If e.DataCol.Name = "工序编号" Then
Dim dys As List(Of String) = DataTables("工序单价表").GetUniqueValues("","工序编号")
For Each dy As String In dys
dim n as integer = 0
Dim drs As List(Of DataRow)
drs = DataTables("工序单价表").Select("[工序编号] = '" & dy & "'")
For Each dr As Datarow In drs
n = n + 1
dr("规格次序") =Format(n,"000")
Next
next
if e.dataRow.IsNull("工序编号")
e.dataRow("规格次序") = ""
end if
end if
If e.DataCol.Name = "工序编号" Then
e.DataRow("工序规格码")=e.DataRow("工序编号") + e.DataRow("规格次序")
End If
先定工序编号列然后重置列,但发现工序规格码只有第一行起变化,如果一行行地选工序编码就能变化。为会什么呢?