此主题相关图片如下:1621125853(1).png
各位老师上午好!
我建的目录树,如上图所示,想打开目录树时,第3层“姓名”这一层是收缩的,不是默认为展开的,请老师们指导,谢谢各位老师!!
在目录树的DropDownOpening中代码如下:
Dim filter As String
If CurrentTable.Cols.Contains("hzXM") Then
If CurrentTable.Current.IsNull("hzXM") = False
filter = "hzXM='" & CurrentTable.Current("hzXM") & "'" '对活动表进行筛选
End If
Else
If CurrentTable.Current.IsNull("hzXM") = False
filter = "hzXM='" & CurrentTable.Current("hzXM") & "'" '对活动表进行筛选
End If
End If
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("BCDXXX","xzMC|cunMC|szBE|hzXM",filter) '--------以乡镇名称,村,社,户主姓名为目录列
Dim r As Row = CurrentTable.current
trv.Nodes.Insert("选择户主姓名",0)
trv.ExpandAll