表“焊接部件清单”中列“焊接方法”,是由“焊接工艺卡清单中筛选出来的,并且设置了多值字段
PrepareEdit事件
”If e.IsFocusCell Then
If e.Col.Name = "焊接方法" Then
e.Col.Combolist = DataTables("焊接工艺卡清单").GetComboListString("焊接方法", "[生产令号] = '" & e.Row("生产令号") & "' And [工艺卡号] = '" & e.Row("工艺卡号") & "'")
End If
End If
现在想实现在“焊接方法”列中勾选某项,则在相应的逻辑列中自动勾选,
编码如下:
Dim ary1() As String = {"焊接方法_GTAW","焊接方法_SMAW","焊接方法_SAW","焊接方法_GMAW"}
Dim ary2() As String = {"焊接方法_GTAW","焊接方法_SMAW","焊接方法_SAW","焊接方法_GMAW"}
If e.DataCol.Name = "焊接方法" Then
Dim str As String = e.DataRow("焊接方法")
Dim ary3 = str.split("|")
For i As Integer = 0 To ary1.length-1
Dim idx As Integer = array.indexof(ary3, ary1(i))
If idx >= 0 Then
e.DataRow(ary2(i)) = True
Else
e.DataRow(ary2(i)) = False
End If
Next
End If
但是没反应,不知道是哪里有问题?