Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1") Dim nd As WinForm.TreeNode Dim dt As DataTable = DataTables("表A") tr.StopRedraw() tr.Nodes.Clear tr.Nodes.Add("产品图号") Dim v As String = e.Form.Controls("TextBox1").Text Dim filter = "" If v > "" Then filter = "标题 = '" & v & "'" Else filter = "父键 is null" End If For Each dr As DataRow In dt.Select(filter) nd = tr.Nodes.Add(dr("键"),dr("标题")) Functions.Execute("AddChildren",nd,dt) Next tr.ResumeRedraw()
|