Foxtable(狐表)用户栏目专家坐堂 → [求助]带目录树节点的动态筛选并分页加载


  共有2073人关注过本帖树形打印复制链接

主题:[求助]带目录树节点的动态筛选并分页加载

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/8/26 17:04:00 [显示全部帖子]

Dim txt As String = e.Form.Controls("过滤值").Text
Dim tbl As DataTable = DataTables("tabDIYTable24")
Dim sxxm As String = e.Form.Controls("过滤项目").text
Dim ftxt As String
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim tb As WinForm.TreeNode = trv.SelectedNode
Dim i As Integer = tb.Level
If txt = "" And tb.Text <> "所有分类" And i = 0 Then
    ftxt = "F128" & " = '" & tb.Text & "'"
Else If txt = "" And tb.Text <> "所有分类" And i = 1 Then
    ftxt = "F128" & " = '" & tb.ParentNode.Text & "' and F126" & " = '" & tb.Text & "'"
Else If txt <> "" And tb.Text <> "所有分类" And i = 0 Then
    txt = "'%" & txt & "%'"
    For Each cl As DataCol In DataTables("tabDIYTable24").DataCols
        If cl.Caption = sxxm Then
            ftxt = cl.Name & " Like " & txt & " and F128" & " = '" & tb.Text & "'"
        End If
    Next
Else If txt <> "" And tb.Text <> "所有分类" And i = 1 Then
    txt = "'%" & txt & "%'"
    For Each cl As DataCol In DataTables("tabDIYTable24").DataCols
        If cl.Caption = sxxm Then
            ftxt = cl.Name & " Like " & txt & " and F128" & " = '" & tb.ParentNode.Text & "' and F126" & " = '" & tb.Text & "'"
        End If
    Next
Else If  txt <> "" And tb.Text = "所有分类" Then
    txt = "'%" & txt & "%'"
    For Each cl As DataCol In DataTables("tabDIYTable24").DataCols
        If cl.Caption = sxxm Then
            ftxt = cl.Name & " Like " & txt
        End If
    Next
Else
    ftxt = ""
End If
With DataTables("tabDIYTable24")
    .LoadFilter = ftxt '一定要清除加载条件
    .LoadTop = 15
    .LoadPage = 0
    .Load()
End With

 回到顶部