treeview 代码问题
Private Sub trwDepart_NodeClick(ByVal Node As MSComctlLib.Node) ‘treeview的代码Dim DepartId As String
Dim strFilter As String
If Node.Key <> "full" Then
DepartId = Mid(Node.Key, 2, Len(Node.Key) - 1)
strFilter = "Depart_ID =" & "'" & DepartId & "'"
rctEmployees.Filter = strFilter
flexEmployees.Redraw = False
Call IniGrid(flexEmployees) ’flexEmployees为flexgrid控件,rctEmployees为一个员工信息的记录集(select * from 员工信息) ,通过两个call调用来把数据填充到flexgrid控件中
Call showdata(rctEmployees, flexEmployees)
flexEmployees.Redraw = True
Else
rctEmployees.Filter = ""
flexEmployees.Redraw = False
Call IniGrid(flexEmployees)
Call showdata(rctEmployees, flexEmployees)
flexEmployees.Redraw = True
End If
End Sub
请问 为什么这代码中没有提供到关于添加节点 等的语句 都能够在treeview中看到响应的数据
语句 DepartId = Mid(Node.Key, 2, Len(Node.Key) - 1) 中MId()函数为什么要从第二个字符串中开始搜索而不是第一个