以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 目录树 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=93191) |
|
-- 作者:jamhuton -- 发布时间:2016/11/22 15:52:00 -- 目录树
|
|
-- 作者:有点蓝 -- 发布时间:2016/11/22 16:04:00 -- 类似 Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree(dt, "产品|年|月") trv.StopRedraw For Each nd As WinForm.TreeNode In trv.AllNodes Dim Year As Integer = nd.DataRow("年") Dim Month As Integer = nd.DataRow("月") Dim Product As String = nd.DataRow("产品") Select Case nd.Level Case 1 nd.Text = nd.text & "年(" & dt.Compute("Sum(订单数)","年 = " & Year & " and 产品 = \'" & Product & "\'") & "条)" Case 2 nd.Text = nd.text & "月(" & dt.Compute("Sum(订单数)","年 = " & Year & " And 月 = " & Month & " and 产品 = \'" & Product & "\'") & "条)" Case 0 nd.Text = nd.text & "(" & nd.DataRow("订单数") & ")" End Select Next trv.Nodes.Insert("加载所有行","加载所有行(" & dt.Compute("Sum(订单数)") & "条)",0) trv.ResumeRedraw |
|
-- 作者:jamhuton -- 发布时间:2016/11/22 16:26:00 -- 搞定,原来把case的编号改一下就行了,谢谢老师!! |