如果不用DataRow属性,则需要直接拆分节点的FullPath,代码为:
Dim Filter As String = ""
Dim Value() As String
Value = e.Node.FullPath.Split("\")
If e.Node.Text <> "显示所有行" Then
Select Case e.Node.Level
Case 0
Filter = "[产品] = '" & Value(0) & "'"
Case 1
Filter = "[产品] = '" & Value(0) & "' And [客户] = '" & Value(1) & "'"
Case 2
Filter = "[产品] = '" & Value(0) & "' And [客户] = '" & Value(1) & "' And [雇员] = '" & Value(2) & "'"
End Select
End If
Tables("订单").Filter = Filter
http://www.foxtable.com/help/topics/2690.htm