做个例子上传上来很难么?
'If e.node.Level > 0 Then
Dim filter As String = ""
Dim dr As DataRow = e.Node.DataRow
If e.Node.FullName.Startswith("按分组") Then
If e.Node.Level = 1 Then
filter = "省 = '" & dr("省") & "'"
Else If e.Node.Level = 2 Then
filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "'"
Else If e.Node.Level = 3 Then
filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "'"
Else If e.Node.Level = 4 Then
filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "' and 乡镇 = '" & dr("乡镇") & "'"
Else If e.Node.Level = 5 Then
filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "' and 乡镇 = '" & dr("乡镇") & "' and 街道居委 = '" & dr("街道居委") & "'"
End If
filter = "客户分组 in ('" & DataTables("客户分组").GetComboListString("街道居委", filter).Replace("|", "','") & "')"
'DataTables("个人客户_个人客户信息").LoadFilter = Filter '设置加载条件
'DataTables("个人客户_个人客户信息").Load()
Else If e.Node.FullName.Startswith("按等级") Then
filter = "客户等级 = '" & dr("省") & "'"
Else If e.Node.FullName.Startswith("按状态") Then
filter = "客户状态 = '" & dr("省") & "'"
Else If e.Node.FullName.StartsWith("按来源") Then
filter = "客户来源 = '" & dr("省") & "'"
End If
Dim t As Table = Tables("个人客户_个人客户信息")
t.DataTable.LoadFilter = Filter '设置加载条件
t.DataTable.Load()
t.Filter = ""
Dim idx As Integer = e.Node.Text.IndexOf("(")
If idx > -1 Then
e.Node.Text = e.Node.Text.SubString(0, idx) & "(" & t.Rows.Count & ")"
Else
e.Node.Text = e.Node.Text & "(" & t.Rows.Count & ")"
End If