以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 目录树展开当月节点以及选定当天节点的问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=154582) |
-- 作者:宝宝猪jerry -- 发布时间:2020/9/19 10:09:00 -- 目录树展开当月节点以及选定当天节点的问题 老师,请问我怎么才能用当天日期去展开指定月的目录树并选择当天日期呢? 我这些写的时候就报错了 Dim y As Integer = Date.Today.Year Dim m As Integer = Date.Today.Month Dim d As Integer = Date.Today.day Dim g As New GroupTableBuilder("SQL_JYRB", DataTables("JYRB")) g.Groups.AddDef("dpm") g.Groups.AddDef("DateTime",DateGroupEnum.Year,"年") g.Groups.AddDef("DateTime",DateGroupEnum.month,"月") g.Groups.AddDef("DateTime",DateGroupEnum.day,"日") g.Totals.AddDef("bghjnm") g.Totals.AddDef("cdspnm") g.Totals.AddDef("cdhjnm") g.VerticalTotal = True g.Decimals = 2 g.FromServer = True Tables("经营数据日报_Table1").DataSource = g.BuildDataSource() Tables("经营数据日报_Table1").AutoSizeCols() Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree("经营数据日报_Table1","年|月|日") trv.Nodes(y).Expand trv.Nodes(y).Nodes(m).Expand ‘这里报错了:指定的参数已超出有效值的范围。参数名: index’ 怎么选定到当天的节点还不知道怎么写,请老师指导! |
-- 作者:有点蓝 -- 发布时间:2020/9/19 10:24:00 -- trv.Nodes(cstr(y)).Expand trv.Nodes(cstr(y)).Nodes(cstr(m)).Expand 或者 Dim y As string= Date.Today.Year Dim m As string= Date.Today.Month |