在快捷菜单的Click事件定义如下代码,欲实现列“施工部位”的选择性输入,选择内容从列名提取,求修改
Dim i,j As Integer
For Each skdt As DataTable In DataTables
If right(skdt.name,2) = "gc" Then
i= i+1
End If
Next
Dim skcaption(i-1) As String
For Each skdt As DataTable In DataTables
If right(skdt.name,2) = "gc" Then
j=j + 1
skcaption(j-1) = skdt.caption
End If
output.show("skcaption(" & j & ")=" & skcaption(j-1))
Next
Dim cmb As WinForm.ComboBox
cmb = Forms("窗口1").Controls("ComboBox1")
cmb.ComboList = String.join("|",skcaption)