我增加一个显示所有行,就出错
然后用msg提示信息
错误提示
此主题相关图片如下:tim图片20180209192159.png

然后所有行增加不上,怎么解决
AfterLoad
Tables("商品明细表").ExtendLastCol=True
Tables("商品明细表").filter=""
Tables("商品明细表").Sort = "一级类别,商品编号"
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("商品二级类别","一级类别|二级类别","","一级编号,二级编号") \',"","一级编号,二级编号"
\'msgbox(trv)
\'\'----增加所有行
\'trv.Nodes.Insert("显示所有行",0)
\'msgbox(trv)
trv.StopRedraw \'停止绘制目录树
For Each nd
As WinForm.TreeNode In trv.AllNodes \'遍历所有节点
If nd.Level = 0 Then \'如果是一级节点
nd.Text = nd.DataRow("一级编号")
& "|"
& nd.text
End If
If nd.Level
= 1 Then \'如果是二级节点
nd.Text = nd.DataRow("二级编号")
& "|"
& nd.text
End If
Next
trv.ResumeRedraw \'恢复绘制目录