原来是:
Dim nd As WinForm.TreeNode = args(0)
Dim dt As DataTable = args(1)
Dim drs As List(of DataRow)
drs = dt.Select("[父键] = '" & nd.name & "'")
For Each dr As DataRow In drs
Dim cd As Winform.TreeNode = nd.Nodes.Add(dr("键"),dr("标题"))
Functions.Execute("AddChildren",cd,dt)
Next
你改为:
Dim nd As WinForm.TreeNode = args(0)
Dim dt As DataTable = args(1)
Dim drs As List(of DataRow)
drs = dt.Select("[父键] = '" & nd.name & "'", "排序列")
For Each dr As DataRow In drs
Dim cd As Winform.TreeNode = nd.Nodes.Add(dr("键"),dr("标题"))
Functions.Execute("AddChildren",cd,dt)
Next