赋值代码,这块除了当前单元格(绑定目录树DROPDOWN的不能赋值,其他都有数据)
If e.Node.name<>"全部" Then
If e.Node.Nodes.Count = 0 Then
If e.Form.DropDownBox IsNot Nothing Then
Dim ary() As String = e.node.Text.Split(" ")
Dim ary1() As String = vars("tblcol").split(".")
Dim dtname As String=Tables(ary1(0)).DataTable.name
Dim dr As DataRow = DataTables("zadropset").Find("[dropbintable] ='"& dtname &"' And [dropbincol] ='"& ary1(1) &"'")
If dr IsNot Nothing AndAlso dr.IsNull("droplistcol")=False AndAlso dr.IsNull("dvaluecol")=False Then '如果在项目表找到对应的行
Dim Parts(),Parts1(),Parts2() As String
Dim i As Integer
Parts1=dr("droplistcol").Split(",")
Parts2=dr("dvaluelist").Split(",")
Dim dr1 As DataRow = DataTables(dr("dvaluetable")).Find(dr("dvaluecol") & "='"& e.Node.name &"'")'获取生成此节点的DataRow
If dr1 IsNot Nothing Then
For i=0 To Parts1.Length-1
If Tables(ary1(0)).Cols.Contains(Parts1(i)) Then
Tables(ary1(0)).Current(Parts1(i)) = dr1(Parts2(i))
End If
Next
End If
e.Form.DropDownBox.CloseDropdown
End If
End If
End If
End If