窗口afterload事件编写后,第二次预览窗口会出现报错systemidle为引用到实例
Dim dt As DataTable
Dim b As New GroupTableBuilder("统计表1",DataTables("交易明细"))
b.Groups.AddDef("日期",DateGroupEnum.Year,"年")
b.Groups.AddDef("日期",DateGroupEnum.Month,"月")
b.Groups.AddDef("交易码")
dt = b.Build(False)
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("交易码")
Next
trv.ResumeRedraw