hi all,
i wanted to fill a TreeView control from a text files, where a text file holds a root and each root has another text file with the nodes or children of this root.
the problem is in adding the roots and nodes to the tree view, because it needs a "treeNode[]" array, and offcourse the array needs a constant which i dont know what it could be, and it doesnt allow null values in the array.
---so plz if u can offer any suggestion , go ahead :)
TreeView Help
Started by amrosama, Aug 20 2008 11:24 AM
5 replies to this topic
#1
Posted 20 August 2008 - 11:24 AM
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript
|
|
|
#3
Posted 20 August 2008 - 11:37 AM
yes you are right, but i think this applies if the TreeView have only individual nodes without children.
im not sure if am right though, so please can you explain more or write samle code.
thnx for ur reply
im not sure if am right though, so please can you explain more or write samle code.
thnx for ur reply
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript
#4
Posted 20 August 2008 - 11:44 AM
If you want to add a node to a tree with children:
//Add the node.
//But keep a reference to it.
TreeNode node = tree.Nodes.Add("Lvl 1 node");
//Add a child node to the referenced object.
node.Nodes.Add("Lvl 2 node");
Edited by Xav, 20 August 2008 - 12:04 PM.
Code typo
#5
Posted 20 August 2008 - 12:03 PM
thnx lot xav you are a genius, its simple and easy
i would have probably given up:)
it worked with a small modification by using (node.Nodes .Add("level 2 node");
because there isnt a childnode class or method.
i would have probably given up:)
it worked with a small modification by using (node.Nodes .Add("level 2 node");
because there isnt a childnode class or method.
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript


Sign In
Create Account


Back to top









