When many are pursuing a variety of directory Tree, I moved out TreeView that I think is the best function and performance, but it is not beautiful!
Function Sort (FLAG) {for (var i = 1; i <= TreeView1.nodes.count; i ) {TreeView1.nodes (i). Sorted = flag;}}
Function deletenode () {var Iindex; IINDEX = TreeView1.selectedItem.index; TreeView1.nodes.Remove (IIndex);
Function deletetree () {TreeView1.nodes.clear ();
Function checknode (node) {var IIndex = 0; with (TreeView1) {if (node.children> 0) {iIndex = node.child.index; while (IIndex! = (node.child.lastsibling.index) {nodes (IIndex) .checked = node.checked; if (nodes (iDex) .children> 0) {CheckNode (nodes (ionex));} IIndex = nodes (iIndex) .Next.index;} IIdex = node.child.lastsibling .Index; nodes (inedex) .checked = node.checked; if (iindex) .children> 0) {CheckNode (nodes (});}}}} Function AddNode (Level, Key, Text) {//// Level: // 0: First // 1: Last bar // 2: Next // 3: Previous // 4: Child Node Var vkey; vkey = TreeView1.SelectedItem.Key; TreeView1.nodes.Add ( Vkey, Level, Key, Text);
Function addrootnode (key, text) {TreeView1.nodes.add (Null, 0, Key, Text);
script>