If e.Node.Level = 1 Then '如果单击的是第二层节点
Dim ps() As String = e.Node.FullPath.Split("\")
Dim box1 As WinForm.DropDownBox = Forms("新增入库").Controls("DropBox1")
Dim box2 As WinForm.DropDownBox = Forms("新增出库").Controls("DropBox1")
Dim dr As DataRow = DataTables("商品库存").Find("商品类别 = '" & ps(0) & "' And 商品名称 = '" & ps(1) & "'")
If dr IsNot Nothing Then
If box1.Focused = True Then
box1.value = dr("商品名称")
Else
box2.value = dr("商品名称")
End If
End If
e.Form.DropDownBox.CloseDropdown()
End If
为什么这样不可以呢 帮我看看吧 TKS!